-
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: department-options, favorite-departments API #73
Conversation
const res = (await this.prisma.$queryRaw` | ||
SELECT DISTINCT d.code | ||
FROM subject_lecture l | ||
JOIN subject_department d on l.department_id = d.id | ||
WHERE l.year >= ${yearThreshold};`) as { code: string }[]; |
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.
raw query로 해결해야하는 이유가 있을까요?
distinct가 사용이 안되나요??
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.
include된 필드에는 distinct가 안된다고 본 것 같아서 이렇게 했는데 다시 보니 distinct도 안 쓰고 가능한 방법이 있어서 고쳤습니다.
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.
LGTM!
console.log만 지워주세요
), | ||
]); | ||
|
||
console.log('recentDepartmentCodes', recentDepartmentCodes); |
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.
넵!
리뷰 필요 사항