Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API 수정 할 일 #41

Open
toy-k opened this issue May 31, 2023 · 0 comments
Open

API 수정 할 일 #41

toy-k opened this issue May 31, 2023 · 0 comments

Comments

@toy-k
Copy link
Owner

toy-k commented May 31, 2023

==============================================================
Room Controller

[POST] ​/api​/room createRoom

upload는 다른 api

  • accesstoken -> user X -> exception
  • hostUserId != userId -> exception
  • category X -> exception
  • meetupenddate > meetupstartdate -> exception
  • currentJoinNumber = 1 default
  • price = 0 default
  • roomStatus = Wating default

[GET] ​/api​/room​/id​/{id} getRoom

  • room x -> exception
  • 조회수 ++ redis

[GET] ​/api​/room​/list getRoomList

  • 룸이 없을때? -> exception
  • pagenation, size 추가

[GET] ​/api​/room​/list​/after-meetup-start getRoomListAfterMeetupStart

  • 이미 모집 끝난 모임 호출 (시간계산) -> 상태 안정성 증가 시 , 상태 Enum 값으로 비교
  • 룸이 없을때? -> exception
  • pagenation, size 추가

[GET] ​/api​/room​/list​/before-meetup-start getRoomListBeforeMeetupStart

  • 모집 중 모임 호출 (시간계산) -> 상태 안정성 증가 시 , 상태 Enum 값으로 비교
  • 룸이 없을때? -> exception
  • pagenation, size 추가
    [PUT] ​/api​/room updateRoom
  • 더티체킹 고려
  • accesstoken -> user X -> exception
  • hostUserId != userId -> exception
  • category X -> exception
  • meetupenddate > meetupstartdate -> exception
  • currentJoinNumber = 수정x
  • price = - [ ] 입려시 exception
  • roomStatus = 수정 x
  • title, desc,category, locatinoin, meetupstattdate, meetupenddate, maxjoinnumber, price, roomstatus, roomtype 수정 가능
  • 사진 수정가능
    [DELETE] ​/api​/room deleteRoom
  • accesstoken -> user X -> exception
  • hostUserId != userId -> exception
  • 유저가 만든룸 아닐때 -> exception

==============================================================
Upload Controller

[POST] ​/api​/upload fileUpload

  • files x -> exception
  • file size 10mb -> exception
  • room x -> exception

[GET] ​/api​/upload​/download downloadZip

  • room x -> exception
  • filename x -> exception

[DELETE] ​/api​/upload deleteFile

  • room x -> exception

  • filename x -> exception

  • 방 별로 file name 볼 수 있는 api 추가

  • 없는 파일명 요청시 예외처리

==============================================================
User Controller

[GET] ​/api​/user​/id​/{id} 유저 정보 조회

  • user x -> exception

[GET] ​/api​/user​/me findMeByToken

  • accesstoken -> user X -> exception
  • user x -> exception

[PUT] ​/api​/user​/me updateMe

  • accesstoken -> user X -> exception

  • user x -> exception

  • 수정가능 o -> username, profileimage, desc

  • image -> byte db저장으로 수정

==============================================================
User Image Controller

[POST] ​/api​/userImage uploadUserImagee

  • file x -> exception
  • user x -> exception
  • 이미 있는데 또 요청하면 -> exception

[GET] ​/api​/userImage getUserImagee

  • user x -> exception
  • 이미지 없을때 -> 기본이미지 or null

[PUT] ​/api​/userImage updateUserImagee

  • file x -> exception
  • user x -> exception
  • 이미 있는데 또 요청하면 -> 수정

[DELETE] ​/api​/userImage deleteUserImagee

  • user x -> exception

  • 이미지 없을때 -> exception

  • path 관련 로직 제거

==============================================================

Announce Controller

[POST] ​/api​/announce createAnnounce

  • accesstoken -> user X -> exception
  • user x -> exception
  • hostUserId != userId -> exception

[GET] ​/api​/announce​/id​/{id} getAnnounce

  • announce x -> exception
  • 조회수 기능 추가

[GET] ​/api​/announce​/list getAnnounceList
[PUT] ​/api​/announce updateAnnounce

  • accesstoken -> user X -> exception

  • user x -> exception

  • hostUserId != userId -> exception

  • announce x -> exception

  • 수정 가능 title, desc
    [DELETE] ​/api​/announce deleteAnnounce

  • accesstoken -> user X -> exception

  • user x -> exception

  • hostUserId != userId -> exception

  • announce x -> exception

  • image -> byte db저장으로 수정

==============================================================
Announce Upload Controller

[POST] ​/api​/announceUpload fileUpload

  • files x -> exception
  • file size 10mb -> exception
  • announce x -> exception

[GET] ​/api​/announceUpload​/download downloadZip

  • announce x -> exception
  • filename x -> exception

[DELETE] ​/api​/announceUpload deleteFile

  • announce x -> exception

  • filename x -> exception

  • 방 별로 file name 볼 수 있는 api 추가

  • 없는 파일 이름 요청시 exception

==============================================================
Host User Controller

[GET] ​/api​/hostUser​/id getHostUser

  • user x -> exception
  • host인 user인 경우 없을때

[GET] ​/api​/hostUser​/ids getHostUser

  • user x -> exception
  • room x -> exception
  • host인 user인 경우 없을때

==============================================================
Joined User Controller

[GET] ​/api​/joinedUser​/id getJoinedUser

  • id 없을때 -> exception

[GET] ​/api​/joinedUser​/ids getJoinedUser

  • user x -> exception
  • room x -> exception

[GET] ​/api​/joinedUser​/roomId getJoinedUserByRoomId

  • room x -> exception

[GET] ​/api​/joinedUser​/userId getJoinedUserByUserId

  • user x -> exception

  • 방 입장 api 추가

  • 방 나가기 api 추가

//룸 상태 바꾸는 기능은 JOINEDUSER API 에서 관리

  • 사람수가 다 찼을때
  • 사람수 다 찼다가 줄어서 비어있을때
  • 모집기간이 지났을때 , 룸 상태 CLOSE - batch? 1시간 단위?

================================================

Review Controller

[POST] / createReview

  • accesstoken -> user X -> exception
  • user x -> exception
  • room x -> exception
  • joineduser != userId -> exception

[GET] /roomId getReview

  • room x -> exception
    [GET] /userId getReviewByUserId
  • user x -> exception
    [DELETE] / deleteReview
  • accesstoken -> user X -> exception
  • user x -> exception
  • room x -> exception
  • joineduser != userId -> exception
  • review x -> exception
  • writer != userId -> exception

==============================================================
hostreview 로직 생성

[POST] / createHostReview

  • accesstoken -> user X -> exception
  • user x -> exception
  • room x -> exception
  • joineduser != userId -> exception
  • hostuser != userId -> exception

[GET] /roomId getReview

  • room x -> exception

[DELETE] / deleteReview

  • accesstoken -> user X -> exception
  • user x -> exception
  • room x -> exception
  • joineduser != userId -> exception
  • review x -> exception
  • hostuser != userId -> exception
  • writer != hostUser -> exception

==============================================================
admin api

[DELETE] / deleteRoom

  • accesstoken -> user X -> exception
  • user x -> exception
  • room x -> exception

[DELETE] / deleteReview

  • 댓글 삭제
  • accesstoken -> user X -> exception
  • user x -> exception
  • room x -> exception
  • review x -> exception

==============================================================

  • test

  • jacoco

  • 검색기능

  • 값 테스트

  • 예외처리시 예외 메시지나 만들어진 포맷 던지기

  • validation 작동

  • 인텔리제이 환경변수 -> .env 환경별 생성 및 수정

  • room, announce image 로직 user image 처럼 수정

eventeamilschdeler.java

  • getRoomListafterMeetupStart() 인자 랜덤 호출 기능추가

  • N+1 을 비롯한 쿼리 수 최소화 로직 최적화

@toy-k toy-k changed the title Todo API 수정 할 일 May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant