-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat: Map API 수정 및 맛집 삭제 API, 키워드 저장 로직 추가 #34
Conversation
- invite link 생성 API 구현 - invite-link module, service 생성 - map controller에서 invite-link service 호출 - user-map 권한체크를 위한 guard 추가
- 지도 삭제 API는 soft delete vs hard delete 중에 선택이 필요하므로 우선 보류 (mvp 범위아님)
- 지도 생성 - 서버에서 id 생성하도록 수정 - 지도 정보 조회 - ui상 필요한 place 개수 return
- 등록된 맛집 삭제 API 추가 - 최근 검색한 키워드 저장 로직 추가
|
||
@Property({ type: 'string' }) | ||
@Property({ type: 'string', unique: true }) |
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.
class validator로 unique 침범하면, 에러 메시지 커스텀하게 보여줄 수 있도록 하는 건 어떨까요?
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.
오~ 좋은데 한번 해볼게 감사링!
@@ -38,7 +38,7 @@ export class PlaceForMap { | |||
}) | |||
likedUserIds: number[]; | |||
|
|||
@OneToOne(() => User) | |||
@ManyToOne(() => User) |
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.
good
@@ -27,7 +28,7 @@ export class CustomExceptionFilter implements ExceptionFilter { | |||
private readonly utilService: UtilService, | |||
) {} | |||
|
|||
async catch(exception: Error, host: ArgumentsHost) { | |||
async catch(exception: BaseException | Error, host: ArgumentsHost) { |
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.
썃
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.
ㅋㅋㅋㅋㅋㅋㅋㅋㅋ
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.
ㅋㅋㅋㅋㅋ
src/auth/strategies/jwt.strategy.ts
Outdated
id: payload.id, | ||
}); | ||
if (!user) { | ||
throw new UserNotFoundException(); |
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.
guard에 들어가는 strategy라서 unauth 로 날려주는 게 맞을 거 같은데, 404로 바꾼 이유가 잇을까여?
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.
오이 jwt strategy에서 토큰이 유효하지 않는 경우는 401로 다 처리하고 있어서,
유효한 토큰에 유저가 없는 경우를 알려줄려고 404로 하고 유저 없다고 에러 메시지로 따로 적었어
401이 맞긴 하겠다 code만 401로 바꿀게!
@@ -30,6 +30,10 @@ const MikroOrmConfig: Options = { | |||
entities: entities, | |||
metadataProvider: ReflectMetadataProvider, | |||
debug: utilService.isDev(), | |||
schemaGenerator: { | |||
disableForeignKeys: true, |
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.
설명 구다사이!
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.
실제 DB에 foreignkey 안생기게 하는 옵션인데, mapID 타입 바꾸다가 constraint 계속 걸려서 화딱지가 나버림
그래서 일단 추가했는데 문제 생길게 있을까 ??
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.
외래키가 없을 떄 실무에서도 문제된 적 없지? 그때도 얘기 나왔던 거 같은데 그럼 컷!!!
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.
화나지마 찬웅이형
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.
ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ
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.
발리데이터 너무 이쁘다 굿
PR Type
For what purpose
ui에 맞춘 API 수정 및 MVP 기능 API 추가
Key changes
To reviewers
ui따라 바꿀게 많아서 테스트는 나중에..
Screenshots