-
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 #66 from modern-agile-team/feature/friend
Add(NicoDora/friends) : 친구 요청 수락하기 API 추가
- Loading branch information
Showing
6 changed files
with
108 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
File renamed without changes.
63 changes: 63 additions & 0 deletions
63
src/friends/swagger-decorators/friend-response-accept.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,63 @@ | ||
import { applyDecorators } from "@nestjs/common"; | ||
import { ApiOperation, ApiResponse } from "@nestjs/swagger"; | ||
|
||
export function ApiFriendResponseAccept() { | ||
return applyDecorators( | ||
ApiOperation({ | ||
summary: '친구 요청 수락 API', | ||
description: '친구 요청을 수락합니다.', | ||
}), | ||
ApiResponse({ | ||
status: 200, | ||
description: '성공적으로 친구 요청을 수락한 경우', | ||
content: { | ||
JSON: { example: { message: '친구 요청을 수락했습니다.' } }, | ||
}, | ||
}), | ||
ApiResponse({ | ||
status: 401, | ||
description: '우리 서비스의 액세스 토큰이 아닌 경우', | ||
content: { | ||
JSON: { | ||
example: { statusCode: 401, message: '유효하지 않은 토큰입니다.' }, | ||
}, | ||
}, | ||
}), | ||
ApiResponse({ | ||
status: 403, | ||
description: '만료된 액세스 토큰인 경우', | ||
content: { | ||
JSON: { | ||
example: { statusCode: 403, message: '만료된 토큰입니다.' }, | ||
}, | ||
}, | ||
}), | ||
ApiResponse({ | ||
status: 404, | ||
description: '친구 요청을 찾을 수 없는 경우', | ||
content: { | ||
JSON: { | ||
example: { statusCode: 404, message: '친구 요청을 찾을 수 없습니다.' }, | ||
}, | ||
}, | ||
}), | ||
ApiResponse({ | ||
status: 411, | ||
description: '액세스 토큰이 제공되지 않은 경우', | ||
content: { | ||
JSON: { | ||
example: { statusCode: 411, message: '토큰이 제공되지 않았습니다.' }, | ||
}, | ||
}, | ||
}), | ||
ApiResponse({ | ||
status: 500, | ||
description: '친구 요청에 실패한 경우', | ||
content: { | ||
JSON: { | ||
example: { statusCode: 500, message: '친구 요청에 실패했습니다.' }, | ||
}, | ||
}, | ||
}), | ||
); | ||
} |
File renamed without changes.