-
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 #72 from modern-agile-team/feature/friend
Add(NicoDora/friends) : 영구거절한 친구 요청 불러오기 및 영구거절 취소 API 추가.
- Loading branch information
Showing
5 changed files
with
200 additions
and
0 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
63 changes: 63 additions & 0 deletions
63
src/friends/swagger-decorators/delete-reject-permanent-cancel.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 ApiDeleteRejectPermanentCancel() { | ||
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: '친구 요청 영구 거절 취소에 실패했습니다.' }, | ||
}, | ||
}, | ||
}), | ||
); | ||
} |
76 changes: 76 additions & 0 deletions
76
src/friends/swagger-decorators/get-reject-permanent.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,76 @@ | ||
import { applyDecorators } from "@nestjs/common"; | ||
import { ApiOperation, ApiResponse } from "@nestjs/swagger"; | ||
|
||
export function ApiGetRejectPermanent() { | ||
return applyDecorators( | ||
ApiOperation({ | ||
summary: '내가 영구적으로 친구 요청을 거절한 목록 조회 API', | ||
description: '내가 영구적으로 친구 요청을 거절한 목록을 조회합니다.', | ||
}), | ||
ApiResponse({ | ||
status: 200, | ||
description: | ||
'성공적으로 영구적으로 친구 요청을 거절한 목록을 조회한 경우 (배열 형태) , 영구적으로 친구 요청을 거절한 목록이 없는 경우 빈 배열을 반환합니다.', | ||
content: { | ||
Array: { | ||
example: [ | ||
{ | ||
id: 1, | ||
requesterId: 1, | ||
respondentId: 63, | ||
status: '친구 거절', | ||
}, | ||
{ | ||
id: 2, | ||
requesterId: 2, | ||
respondentId: 63, | ||
status: '친구 거절', | ||
}, | ||
{ | ||
id: 3, | ||
requesterId: 3, | ||
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: '토큰이 제공되지 않았습니다.' }, | ||
}, | ||
}, | ||
}), | ||
); | ||
} |