Skip to content

Conversation

@Socializedistp
Copy link
Collaborator

@Socializedistp Socializedistp commented Feb 9, 2025

Sweepic Server PR List

close #74

⚒️develop의 최신 커밋을 pull 받았나요?

  • 최신 커밋 업데이트

🔍️ 이 PR을 통해 해결하려는 문제가 무엇인가요?

어떤 기능을 구현한건지, 이슈 대응이라면 어떤 이슈인지 PR이 열리게 된 계기와 목적을 Reviewer 들이 쉽게 이해할 수 있도록 적어 주세요
일감 백로그 링크나 다이어그램, 피그마를 첨부해도 좋아요

  1. 사진을 휴지통으로 이동('/trust/active', patch)
  2. 휴지통에서 사진 복구('/trust/restore',patch)
  3. 휴지통에 있는 사진 영구삭제('/trust/,delete)

fig_1
fig_2

사진을 휴지통으로 이동(*사진을 휴지통으로 이동 시키기(image의 status를 1에서 0으로 변경)
휴지통에서 사진 복구(휴지통에 있는 사진(여러개 가능)의 status를 0에서 1로 변경)
휴지통에 있는 사진 영구삭제하기(휴지통에 있는 사진을(status가 0인지에 대한 검증을 거침) 영구 삭제)
에 대한 기능 구현

✨ 이 PR에서 핵심적으로 변경된 사항은 무엇일까요? (핵심 작업 내용)

문제를 해결하면서 주요하게 변경된 사항들을 적어 주세요

*trust.routers.ts에 관련 라우터 정의
*trust.controller.ts에 handleImageStatus, handleImageRestore, handleImageDelete정의
trust_controller
*trust.service.ts
trust_service
*trust.repository.ts에 이미지 status update, 이미지 데이터 삭제, 이미지 데이터 불러오기에 대한 기능 정의
trust_repo

🤚 동작 확인

기능을 실행했을 때 정상 동작하는지 여부를 확인하고 스크린 샷을 올려주세요

*사진 휴지통으로 이동
trust_active

*사진 복구
trust_restore

*사진 휴지통에서 삭제
*(휴지통에 없는 사진을 삭제하려고 할 때)
trust_delete_Err

*정상적으로 삭제
trust_delete_OK

🔖 핵심 변경 사항 외에

추가적으로 변경된 부분이 있나요?

없으면 "없음" 이라고 기재해 주세요

🙏 Reviewer 분들이 이런 부분을 신경써서 봐 주시면 좋겠어요

개발 과정에서 다른 분들의 의견은 어떠한지 궁금했거나 크로스 체크가 필요하다고 느껴진 코드가 있다면 남겨주세요

🩺 이 PR에서 테스트 혹은 검증이 필요한 부분이 있을까요?

테스트가 필요한 항목이나 테스트 코드가 추가되었다면 함께 적어주세요

📌 PR 진행 시 이러한 점들을 참고해 주세요

  • Reviewer 분들은 코드 리뷰 시 좋은 코드의 방향을 제시하되, 코드 수정을 강제하지 말아 주세요.
  • Reviewer 분들은 좋은 코드를 발견한 경우, 칭찬과 격려를 아끼지 말아 주세요.
  • Review는 특수한 케이스가 아니면 Reviewer로 지정된 시점 기준으로 2일 이내에 진행해 주세요.
  • Comment 작성 시 Prefix로 P1, P2, P3 를 적어 주시면 Assignee가 보다 명확하게 Comment에 대해 대응할 수 있어요
    • P1 : 꼭 반영해 주세요 (Request Changes) - 이슈가 발생하거나 취약점이 발견되는 케이스 등
    • P2 : 반영을 적극적으로 고려해 주시면 좋을 것 같아요 (Comment)
    • P3 : 이런 방법도 있을 것 같아요~ 등의 사소한 의견입니다 (Chore)


📝 Assignee를 위한 CheckList

  • To-Do Item

Copy link
Contributor

@jjiinaaa jjiinaaa left a 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를 조회하여 각 함수를 사용하는 방법으로 해야할 거 같습니다.

const {imageId} = req.body;
const parsedImageId = parseInt(imageId);
if (isNaN(parsedImageId)) {
throw new SearchNoResultsError({searchKeyword: 'impageId가 올바르지 않습니다'});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] 오타: -> mediaId

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정완료했습니다.

응답에 status도 포함되도록 했습니다
trust_restore

@jjiinaaa
Copy link
Contributor

jjiinaaa commented Feb 9, 2025

추가로 response 시에 state 컬럼도 조회되게 해주세요.

Copy link
Collaborator

@codie0226 codie0226 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인했습니다!

Copy link
Collaborator

@jonaeunnn jonaeunnn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍👍

Copy link
Collaborator

@asjasj3964 asjasj3964 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다 :) 근데 휴지통에 없는 사진을 삭제할 경우 에러 응답이 통합하기로 한 형식과 조금 다른 것 같은데 확인 부탁드릴게요

@jjiinaaa jjiinaaa merged commit 3d4c2b1 into develop Feb 10, 2025
1 check failed
@jjiinaaa jjiinaaa deleted the feature/SWEP-58 branch February 10, 2025 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ FEAT 기능 구현

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SWEP-58] 휴지통 API

5 participants