Refactor part 1
This commit is contained in:
parent
c07d33bcc9
commit
e21a807fb3
11 changed files with 71 additions and 146 deletions
|
|
@ -45,6 +45,7 @@ const getChannel = async (request: FastifyRequest, reply: FastifyReply) => {
|
|||
return {
|
||||
id: channel.id,
|
||||
name: channel.name,
|
||||
description: channel.description,
|
||||
communityId: channel.communityId,
|
||||
creationDate: channel.creationDate.getTime(),
|
||||
} as IGetChannelResponseSuccess;
|
||||
|
|
@ -68,7 +69,9 @@ const postCreateChannel = async (
|
|||
return {
|
||||
id: channel.id,
|
||||
name: channel.name,
|
||||
description: channel.description,
|
||||
communityId: channel.communityId,
|
||||
creationDate: channel.creationDate.getTime(),
|
||||
} as IPostCreateChannelResponseSuccess;
|
||||
};
|
||||
|
||||
|
|
@ -100,7 +103,9 @@ const patchChannel = async (request: FastifyRequest, reply: FastifyReply) => {
|
|||
return {
|
||||
id: channel.id,
|
||||
name: channel.name,
|
||||
description: channel.description,
|
||||
communityId: channel.communityId,
|
||||
creationDate: channel.creationDate.getTime(),
|
||||
} as IPatchChannelResponseSuccess;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue