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

group api & vote api 추가 #12

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from
Open

group api & vote api 추가 #12

wants to merge 17 commits into from

Conversation

taeboranger
Copy link
Collaborator

Related to #{이슈 번호 기입}

체크 리스트

  • 적절한 제목으로 수정했나요?
  • 상단에 이슈 번호를 기입했나요?
  • Target Branch를 올바르게 설정했나요?
  • Label을 알맞게 설정했나요?

작업 내역

  • groups api 추가
  • votes api 추가
  • auth decorator 적용
  • 임시 user dto 추가
  • 임시 pagination dto 추가
  • ParseBigIntPipe 추가

비고

  • 임시적으로 예외처리를 해두었습니다. 예외처리 코드 등을 정해 추후 수정 하겠습니다.
  • dto validation에서 각각의 문자열 데이터의 max, min length가 정해지면 추후 적용하도록 하겠습니다.
  • groups api, 특히 votes api는 처리해야 하는 예외가 좀 많아서 한번 보시고 피드백 주시면 감사하겠습니다. 테스트를 해보긴 했는데, 제가 놓친게 있을지도 모르겠네요.

@taeboranger taeboranger added the enhancement New feature or request label Sep 18, 2023
Copy link
Collaborator

Choose a reason for hiding this comment

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

migrations 폴더는 삭제해주셔야 될 것 같습니다!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

아 맞네요

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

반영 완료

Copy link
Collaborator

@yesjuhee yesjuhee left a comment

Choose a reason for hiding this comment

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

몇가지 삭제 가능한 부분 확인하여 코멘트 남깁니다!

@@ -26,6 +26,7 @@ export class AuthController {
@ApiOperation({ summary: "카카오 로그인 callback" })
async kakaoLogin(@Query("code") query: string, @Res() res: Response) {
const token = await this.authService.getKakaoIdToken(query);
console.log(token);
Copy link
Collaborator

Choose a reason for hiding this comment

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

삭제해도 되는 부분 같습니다!

Copy link
Collaborator

Choose a reason for hiding this comment

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

해당 파일도 삭제하시면 될 것 같습니다.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oauth2GuardisSignUp을 모두 false로 바꿔도 될 것 같습니다.
isSignUptrue일 경우, 카카오 로그인 된 유저가 회원 가입이 되어있지 않을 때 exception을 보내지 않고 oauthIdCurrentUser로 넘겨주는데 이 옵션은 회원가입 과정에서만 필요한 것으로 확인됩니다!

import { IsInt, Min, Max } from "class-validator";

export class PatchRegistrationDto {
@ApiProperty({ description: "닉네임" })
Copy link
Collaborator

Choose a reason for hiding this comment

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

description 수정해야 할 것 같습니당

Copy link
Collaborator

@yesjuhee yesjuhee left a comment

Choose a reason for hiding this comment

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

Request DTO의 file UUID 형식 관련 의견입니다. 이 부분이 맛집 관련해서 이렇게 슬랙에서 논의된 적이 있는데 단체 사진에 대해서는 따로 논의되지 않았네요 통일하는게 좋지 않을까 싶습니다!

++ 그리고 추가로 getGroup, petchGroup, createGroup 에서 사용하는 GroupDto에는 File 관련 정보가 담기지 않는데 추가하는게 어떨까요? 사실 이부분이 API 문서 작성 부분에서 언급되었어야 했는데 좀 늦게 논의되어서... Restaurant APIUser API는 File 정보를 포함하고 있습니다.

Comment on lines +59 to +63
@ApiProperty({ description: "단체 이미지 파일 uuid" })
@IsUUID()
@IsNotEmpty()
@IsOptional()
fileUUID: string;
Copy link
Collaborator

Choose a reason for hiding this comment

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

fileUUID 필드 대신에

files: { uuid: string }[]

형태로 바꿔야 할 것 같습니다!

#15 create-restaurant.dto.ts 파일 참고하시면 좋을 것 같습니다.

피그마 문서 확인해 보니 그룹에는 프로필 사진, 배너 사진 2장 정도 필요 할 것으로 보이네용

Comment on lines +57 to +61
@ApiProperty({ description: "단체 이미지 파일 uuid" })
@IsUUID()
@IsNotEmpty()
@IsOptional()
fileUUID: string;
Copy link
Collaborator

Choose a reason for hiding this comment

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

여기도 마찬가지로

fileUUID 필드 대신에

files: { uuid: string }[]

형태로 바꿔주면 될 것 같습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants