diff options
Diffstat (limited to 'api/src/routes/channels/#channel_id/index.ts')
-rw-r--r-- | api/src/routes/channels/#channel_id/index.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/api/src/routes/channels/#channel_id/index.ts b/api/src/routes/channels/#channel_id/index.ts index 4001b834..68b52be6 100644 --- a/api/src/routes/channels/#channel_id/index.ts +++ b/api/src/routes/channels/#channel_id/index.ts @@ -10,6 +10,7 @@ import { } from "@fosscord/util"; import { Request, Response, Router } from "express"; import { route } from "@fosscord/api"; +import { OrmUtils } from "@fosscord/util"; const router: Router = Router(); // TODO: delete channel @@ -78,7 +79,7 @@ router.patch("/", route({ body: "ChannelModifySchema", permission: "MANAGE_CHANN if (payload.icon) payload.icon = await handleFile(`/channel-icons/${channel_id}`, payload.icon); let channel = await Channel.findOneOrFail({ where: { id: channel_id } }); - channel = Object.assign(channel, payload); + channel = OrmUtils.mergeDeep(channel, payload); await Promise.all([ channel.save(), |