Skip to content

Commit

Permalink
[BE][Feat] #230 : 사용자별 채널 get api response 타입 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
happyhyep committed Nov 21, 2024
1 parent 02bef4e commit 6a7c53b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion backend/src/controllers/channelController.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const getUserChannelsController = async (req, res) => {
res.status(200).json({
success: true,
message: 'Get channels successfully',
data: channels,
data: { channels },
});
} catch (error) {
console.error(error);
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

0 comments on commit 6a7c53b

Please sign in to comment.