-
Notifications
You must be signed in to change notification settings - Fork 6
[SWEP-58] 휴지통 API 구현 #161
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
[SWEP-58] 휴지통 API 구현 #161
Conversation
[SWEP-58] 휴지통 API
jjiinaaa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imageId는 프론트에서 보낼 수 없습니다. mediaId로 밖에 받을 수 없습니다. mediaId로 id를 조회하여 각 함수를 사용하는 방법으로 해야할 거 같습니다.
src/controllers/trust.controller.ts
Outdated
| const {imageId} = req.body; | ||
| const parsedImageId = parseInt(imageId); | ||
| if (isNaN(parsedImageId)) { | ||
| throw new SearchNoResultsError({searchKeyword: 'impageId가 올바르지 않습니다'}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] 오타: -> mediaId
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
추가로 response 시에 state 컬럼도 조회되게 해주세요. |
codie0226
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확인했습니다!
jonaeunnn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍👍
asjasj3964
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다 :) 근데 휴지통에 없는 사진을 삭제할 경우 에러 응답이 통합하기로 한 형식과 조금 다른 것 같은데 확인 부탁드릴게요
[SWEP-58] 성공 응답에 status포함
[SWEP-58] mypage 필요없는 라우터 삭제
[SWEP-58] 에러 형식 수정

Sweepic Server PR List
close #74
⚒️develop의 최신 커밋을 pull 받았나요?
🔍️ 이 PR을 통해 해결하려는 문제가 무엇인가요?
사진을 휴지통으로 이동(*사진을 휴지통으로 이동 시키기(image의 status를 1에서 0으로 변경)
휴지통에서 사진 복구(휴지통에 있는 사진(여러개 가능)의 status를 0에서 1로 변경)
휴지통에 있는 사진 영구삭제하기(휴지통에 있는 사진을(status가 0인지에 대한 검증을 거침) 영구 삭제)
에 대한 기능 구현
✨ 이 PR에서 핵심적으로 변경된 사항은 무엇일까요? (핵심 작업 내용)
*trust.routers.ts에 관련 라우터 정의



*trust.controller.ts에 handleImageStatus, handleImageRestore, handleImageDelete정의
*trust.service.ts
*trust.repository.ts에 이미지 status update, 이미지 데이터 삭제, 이미지 데이터 불러오기에 대한 기능 정의
🤚 동작 확인
*사진 휴지통으로 이동

*사진 복구

*사진 휴지통에서 삭제

*(휴지통에 없는 사진을 삭제하려고 할 때)
*정상적으로 삭제

🔖 핵심 변경 사항 외에
추가적으로 변경된 부분이 있나요?
🙏 Reviewer 분들이 이런 부분을 신경써서 봐 주시면 좋겠어요
🩺 이 PR에서 테스트 혹은 검증이 필요한 부분이 있을까요?
📌 PR 진행 시 이러한 점들을 참고해 주세요
📝 Assignee를 위한 CheckList