Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BE][Feat] #230 : 사용자별 채널 get api response 타입 수정 #240

Merged
merged 2 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/src/controllers/channelController.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const getUserChannelsController = async (req, res) => {
}
res
.status(200)
.json(new ResponseDto({ resultMsg: 'Get channels successfully', data: channels }));
.json(new ResponseDto({ resultMsg: 'Get channels successfully', data: { channels } }));
} catch (error) {
console.error(error);
return res.status(500).json(new ErrorResponseDto({ message: 'Server error occurred' }));
Expand Down
21 changes: 13 additions & 8 deletions backend/swaggerConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,15 +437,20 @@ const swaggerDefinition = {

// 사용자별 채널 가져오기 응답 스키마
GetUserChannelsResponse: {
type: 'array',
items: {
type: 'object',
properties: {
id: { type: 'string' },
name: { type: 'string' },
generated_at: { type: 'string', format: 'date-time' },
type: 'object',
properties: {
channels: {
type: 'array',
items: {
type: 'object',
properties: {
id: { type: 'string' },
name: { type: 'string' },
generated_at: { type: 'string', format: 'date-time' },
},
required: ['id', 'name', 'generated_at'],
},
},
required: ['id', 'name', 'generated_at'],
},
},
},
Expand Down
Loading