Refactor part 1

This commit is contained in:
Aslan 2026-01-05 16:07:30 +01:00
parent c07d33bcc9
commit e21a807fb3
11 changed files with 71 additions and 146 deletions

View file

@ -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;
};