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

/api/tags/{bookInfo} 에서 login도 조회 가능하게 함 #478

Merged
merged 7 commits into from
May 23, 2023
1 change: 1 addition & 0 deletions backend/src/DTO/tags.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ export interface subDefaultTag {
export interface superDefaultTag {
id: number;
content: string;
login: string;
count: number;
}
1 change: 1 addition & 0 deletions backend/src/tags/tags.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export class SuperTagRepository extends Repository<SuperTag> {
const superTags = await this.createQueryBuilder('sp')
.select('sp.id', 'id')
.addSelect('sp.content', 'content')
.addSelect('NULL', 'login')
.addSelect((subQuery) => subQuery
.select('COUNT(sb.id)')
.from(SubTag, 'sb')
Expand Down
1 change: 1 addition & 0 deletions backend/src/tags/tags.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export class TagsService {
superDefaultTags.push({
id: dt.id,
content: dt.content,
login: dt.login,
count: 0,
});
});
Expand Down