-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from boostcampwm-2024/refactor/response-dto
♻️ refactor: Response DTO 적용, request/response 분리
- Loading branch information
Showing
42 changed files
with
427 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
server/src/admin/dto/login-admin.dto.ts → .../src/admin/dto/request/login-admin.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
server/src/feed/dto/query-feed.dto.ts → ...c/feed/dto/request/feed-pagination.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
export class FeedRecentResponseDto { | ||
private constructor( | ||
private id: number, | ||
private author: string, | ||
private blogPlatform: string, | ||
private title: string, | ||
private path: string, | ||
private createdAt: string, | ||
private thumbnail: string, | ||
private viewCount: number, | ||
private isNew: boolean, | ||
) {} | ||
|
||
static toResponseDto(feed: FeedRecentRedis) { | ||
return new FeedRecentResponseDto( | ||
feed.id, | ||
feed.blogName, | ||
feed.blogPlatform, | ||
feed.title, | ||
feed.path, | ||
feed.createdAt, | ||
feed.thumbnail, | ||
feed.viewCount, | ||
feed.isNew, | ||
); | ||
} | ||
|
||
static toResponseDtoArray(feeds: FeedRecentRedis[]) { | ||
return feeds.map(this.toResponseDto); | ||
} | ||
} | ||
|
||
export type FeedRecentRedis = { | ||
id: number; | ||
blogPlatform: string; | ||
createdAt: string; | ||
viewCount: number; | ||
blogName: string; | ||
thumbnail: string; | ||
path: string; | ||
title: string; | ||
isNew?: boolean; | ||
}; |
Oops, something went wrong.