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

Upload meme #51

Merged
merged 13 commits into from
Sep 28, 2024
Merged

Upload meme #51

merged 13 commits into from
Sep 28, 2024

Conversation

pjw5521
Copy link
Contributor

@pjw5521 pjw5521 commented Sep 25, 2024

  • s3 업로드
  • createMeme api 수정
  • deviceId 필드 추가

@pjw5521 pjw5521 changed the base branch from main to develop September 26, 2024 01:51
Copy link
Member

@Hyun-git Hyun-git left a comment

Choose a reason for hiding this comment

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

LGTM

src/model/meme.ts Outdated Show resolved Hide resolved
src/model/meme.ts Outdated Show resolved Hide resolved
src/model/meme.ts Outdated Show resolved Hide resolved
@@ -55,6 +60,7 @@ export interface IMemeDocument extends Document {

const MemeSchema: Schema = new Schema(
{
deviceId: { type: String, default: '' },
Copy link
Collaborator

@seohyun0120 seohyun0120 Sep 26, 2024

Choose a reason for hiding this comment

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

여기도
deviceId: { type: String, required: true }
로 변경하고
배포전에 deviceId: 'ADMIN' 으로 일괄 업데이트 해야할 것 같아

deviceId가 ADMIN인 user도 하나 생성하고...

Copy link
Collaborator

Choose a reason for hiding this comment

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

내가 같이 수정함
DB 마이그레이션은 배포 직전에 다시 한 번 이야기 해봅시다

src/service/meme.service.ts Outdated Show resolved Hide resolved
Comment on lines 642 to 647
* keywordIds:
* type: array
* items:
* type: string
* example: "667fee6dc58681a42d57dc37"
* description: 밈의 키워드 id 목록
* description: "키워드의 ObjectId 배열"
* description: "등록할 키워드의 ObjectId 목록"
Copy link
Collaborator

Choose a reason for hiding this comment

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

swagger에서 테스트해봤는데 keywordIds가 string[]가 아니고 계속 string 형태로 가서 밈 등록이 안되는데 확인 부탁해 swagger 설정 문제인 것 같은데... 좀 찾아봤는데 어떻게 고쳐야할지 모르겠음

[22:42:31.361] INFO (13453): 667fa549239eeaf786f9aa75,667fa3c824fc9c25eaf3b911

    keywordIds: req.body.keywordIds.map((id: string) => new Types.ObjectId(id)),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

이거 찾아봐도 안나오네... postman에서는 동작하는 거 확인했으니깐 클라쪽에 말해주고 반영할까 ??

@seohyun0120
Copy link
Collaborator

seohyun0120 commented Sep 26, 2024

s3 관련해서 수정해서 커밋 올렸어 (최근 커밋 3개)

  • aws-sdk중에서 s3Client 패키지만 쓰도록 변경
  • 이미지 사이즈 압축 후 업로드 하도록 변경
  • middleware단에서 image 관련 처리 다 하도록 변경
    @pjw5521 @Hyun-git 참고

  • 테스트코드 수정 (이미지 업로드 mocking)
  • deviceId 필수로 변경

Copy link
Member

@Hyun-git Hyun-git left a comment

Choose a reason for hiding this comment

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

굳!

@seohyun0120 seohyun0120 mentioned this pull request Sep 27, 2024
@Hyun-git Hyun-git merged commit 7eaf849 into develop Sep 28, 2024
1 check passed
@seohyun0120 seohyun0120 deleted the uploadMeme branch October 2, 2024 02:43
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

Successfully merging this pull request may close these issues.

3 participants