-
Notifications
You must be signed in to change notification settings - Fork 3
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] 단일 태스크 조회 API 구현 #60
Conversation
if (!section) { | ||
throw new NotFoundException('Section not found'); | ||
} | ||
const section = await this.findSectionOrThrow(moveTaskRequest.sectionId); | ||
task.section = section; | ||
|
||
const beforePostion = LexoRank.parse(moveTaskRequest.beforePosition); |
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.
아악 ,,, 수정해야겠군요 ㅜ
return new TaskResponse(task); | ||
} | ||
|
||
private async findTaskOrThrow(id: number) { |
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.
👍🏻
이런식으로 분리하셨군요!
orThrow
를 쓰시는 분은 거의 못봤는데 자바나 코틀린 쪽 코드같이 보이네요!!! 😃
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.
재사용성을 최대한 높이는 방향으로 분리하려다보니 그런 느낌이 됐네요 ...!
constructor(task: Task) { | ||
this.id = task.id; | ||
this.title = task.title; | ||
this.description = task.description; | ||
this.sectionName = task.section.name; | ||
this.position = task.position; | ||
} |
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.
🟢
나중에 저희 constructor 위치 같은 세부적인 것도 통일해야겠네요~
관련 이슈 번호
close #58
작업 내용
고민과 학습내용
단일 태스크 조회는 아직 마일스톤에 없어서, 일단 비워두고 올렸습니다.
Task, Section 조회 및 예외처리 코드 함수 분리
작업을 먼저 처리해두고 싶어서, 분리하고 바로 사용할 수 있는 단일 조회 API 먼저 구현했습니다 !Task, Section 조회 및 예외처리 코드 함수 분리
도 별도 이슈로 분리하는게 나을까요 ?스크린샷