-
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 #59 from modern-agile-team/feature/friend
Add(NicoDora/friend) : 내가 받은 친구 요청 조회 API 추가
- Loading branch information
Showing
7 changed files
with
147 additions
and
4 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
78 changes: 78 additions & 0 deletions
78
src/friends/swagger-decorators/get-friends-res-pending.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,78 @@ | ||
import { applyDecorators } from "@nestjs/common"; | ||
import { ApiHeaders, ApiOperation, ApiResponse } from "@nestjs/swagger"; | ||
|
||
export function ApiGetFriendsResPending() { | ||
return applyDecorators( | ||
ApiOperation({ | ||
summary: '내가 받은 친구 요청 목록 조회 API', | ||
description: '내가 받은 친구 요청 목록을 조회합니다.', | ||
}), | ||
ApiResponse({ | ||
status: 200, | ||
description: | ||
'성공적으로 친구 요청 목록을 조회한 경우 (배열 형태) , 내가 받은 친구 요청이 없는 경우 빈 배열을 반환합니다.', | ||
content: { | ||
Array: { | ||
example: [ | ||
{ | ||
id: 2, | ||
requesterId: 62, | ||
respondentId: 63, | ||
status: '대기 상태', | ||
}, | ||
{ | ||
id: 5, | ||
requesterId: 64, | ||
respondentId: 63, | ||
status: '대기 상태', | ||
}, | ||
], | ||
}, | ||
}, | ||
}), | ||
ApiResponse({ | ||
status: 401, | ||
description: '우리 서비스의 액세스 토큰이 아닌 경우', | ||
content: { | ||
JSON: { | ||
example: { statusCode: 401, message: '유효하지 않은 토큰입니다.' }, | ||
}, | ||
}, | ||
}), | ||
ApiResponse({ | ||
status: 403, | ||
description: '만료된 액세스 토큰인 경우', | ||
content: { | ||
JSON: { | ||
example: { statusCode: 403, message: '만료된 토큰입니다.' }, | ||
}, | ||
}, | ||
}), | ||
ApiResponse({ | ||
status: 404, | ||
description: 'DB에서 사용자를 찾을 수 없는 경우', | ||
content: { | ||
JSON: { | ||
example: { statusCode: 404, message: '사용자를 찾을 수 없습니다.' }, | ||
}, | ||
}, | ||
}), | ||
ApiResponse({ | ||
status: 411, | ||
description: '액세스 토큰이 제공되지 않은 경우', | ||
content: { | ||
JSON: { | ||
example: { statusCode: 411, message: '토큰이 제공되지 않았습니다.' }, | ||
}, | ||
}, | ||
}), | ||
ApiHeaders([ | ||
{ | ||
name: 'access_token', | ||
description: '액세스 토큰', | ||
required: true, | ||
example: '여기에 액세스 토큰', | ||
}, | ||
]), | ||
); | ||
} |
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