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

refactor: classification 조회 시 isRead에서 readAt으로 응답값 변경 #71

Merged
merged 2 commits into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/modules/classification/dto/classification.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface PostListInClassificationFolder {

createdAt: Date;

isRead: boolean;
readAt: Date;
}

export interface ClassificationPostList {
Expand All @@ -40,7 +40,7 @@ export interface ClassificationPostList {

createdAt: Date;

isRead: boolean;
readAt: Date;
}

export class UpdateAIClassificationDto {
Expand Down
16 changes: 2 additions & 14 deletions src/modules/posts/posts.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,7 @@ export class PostsRepository {
url: 1,
description: 1,
createdAt: 1,
isRead: {
$cond: {
if: { $eq: ['$readAt', null] },
then: false,
else: true,
},
},
readAt: 1,
keywords: '$aiClassification.keywords',
},
},
Expand Down Expand Up @@ -266,13 +260,7 @@ export class PostsRepository {
url: 1,
description: 1,
createdAt: 1,
isRead: {
$cond: {
if: { $eq: ['$readAt', null] },
then: false,
else: true,
},
},
readAt: 1,
keywords: '$aiClassification.keywords',
},
},
Expand Down