-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge(hyunsoo/chat): 채팅방 초대 거절 기능 구현 #92
Feature(hyunsoo/chat): 채팅방 초대 거절 기능 구현 #92
- Loading branch information
Showing
9 changed files
with
166 additions
and
43 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
50 changes: 50 additions & 0 deletions
50
main-project/src/chats/swagger/rejected-invitation.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,50 @@ | ||
import { applyDecorators } from '@nestjs/common'; | ||
import { | ||
ApiBearerAuth, | ||
ApiBody, | ||
ApiNotFoundResponse, | ||
ApiOkResponse, | ||
ApiOperation, | ||
} from '@nestjs/swagger'; | ||
import { SwaggerApiResponse } from 'src/common/swagger/api-response.swagger'; | ||
|
||
export function ApiRejecteInvitation() { | ||
return applyDecorators( | ||
ApiOperation({ | ||
summary: '채팅방 초대 거절', | ||
description: '유저 번호, notice타입, 채팅방 번호를 통해 초대 거절', | ||
}), | ||
ApiBearerAuth(), | ||
ApiBody({ | ||
schema: { | ||
type: 'object', | ||
properties: { | ||
senderNo: { | ||
type: 'number', | ||
minLength: 1, | ||
example: 9, | ||
nullable: false, | ||
description: '초대한 유저의 userNo', | ||
}, | ||
type: { | ||
type: 'number', | ||
maxLength: 1, | ||
nullable: false, | ||
description: '알람 typeNo', | ||
}, | ||
}, | ||
}, | ||
}), | ||
ApiOkResponse( | ||
SwaggerApiResponse.success('채팅방 초대 거절', '채팅방 초대 거절 성공'), | ||
), | ||
ApiNotFoundResponse( | ||
SwaggerApiResponse.exception([ | ||
{ | ||
name: 'noticeNotFound', | ||
example: { msg: '초대 정보가 존재하지 않습니다.' }, | ||
}, | ||
]), | ||
), | ||
); | ||
} |
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