-
Notifications
You must be signed in to change notification settings - Fork 0
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 #71 from modern-agile-team/feature/notice
Add(hobiJeong/notice) : 읽지 않은 채팅 개수 불러오기(날짜기준)
- Loading branch information
Showing
6 changed files
with
75 additions
and
3 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
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
46 changes: 46 additions & 0 deletions
46
src/chat/swagger-decorators/get-chat-unread-counts.decorator.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { applyDecorators } from '@nestjs/common'; | ||
import { ApiOperation, ApiResponse } from '@nestjs/swagger'; | ||
|
||
export function ApiGetChatUnreadCounts() { | ||
return applyDecorators( | ||
ApiOperation({ | ||
summary: '지정한 시간 이후로 읽지 않은 채팅 개수 받아오기', | ||
description: 'getTime()', | ||
}), | ||
ApiResponse({ | ||
status: 200, | ||
description: '개수 받아오기 성공', | ||
content: { | ||
JSON: { | ||
example: 161, | ||
}, | ||
}, | ||
}), | ||
ApiResponse({ | ||
status: 404, | ||
description: '채팅룸 조회 실패', | ||
content: { | ||
JSON: { | ||
example: { | ||
message: '해당 채팅 룸을 찾지 못했습니다.', | ||
error: 'Not Found', | ||
statusCode: 404, | ||
}, | ||
}, | ||
}, | ||
}), | ||
ApiResponse({ | ||
status: 400, | ||
description: 'ObjectId Validation 실패', | ||
content: { | ||
JSON: { | ||
example: { | ||
message: '올바른 ObjectId 형식이 아닙니다.', | ||
error: 'Bad Request', | ||
statusCode: 400, | ||
}, | ||
}, | ||
}, | ||
}), | ||
); | ||
} |