diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-08-08 22:49:16 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-08-09 23:28:27 +0200 |
commit | 26293f37a1f7af131507c0bdd490d2e07f1a9ba7 (patch) | |
tree | 3fdaa7b65f1b66069d08d06143a43c9908395a09 /api/src/routes/guilds/#guild_id/vanity-url.ts | |
parent | Clean up BaseClient assign call (diff) | |
download | server-26293f37a1f7af131507c0bdd490d2e07f1a9ba7.tar.xz |
Use deep merge everywhere
Diffstat (limited to 'api/src/routes/guilds/#guild_id/vanity-url.ts')
-rw-r--r-- | api/src/routes/guilds/#guild_id/vanity-url.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/api/src/routes/guilds/#guild_id/vanity-url.ts b/api/src/routes/guilds/#guild_id/vanity-url.ts index 426559bd..ac46e18a 100644 --- a/api/src/routes/guilds/#guild_id/vanity-url.ts +++ b/api/src/routes/guilds/#guild_id/vanity-url.ts @@ -2,6 +2,7 @@ import { Channel, ChannelType, getPermission, Guild, Invite, trimSpecial } from import { Router, Request, Response } from "express"; import { route } from "@fosscord/api"; import { HTTPError } from "@fosscord/util"; +import { OrmUtils } from "@fosscord/util"; const router = Router(); @@ -47,7 +48,7 @@ router.patch("/", route({ body: "VanityUrlSchema", permission: "MANAGE_GUILD" }) const { id } = await Channel.findOneOrFail({ where: { guild_id, type: ChannelType.GUILD_TEXT } }); - await Object.assign(new Invite(), { + await OrmUtils.mergeDeep(new Invite(), { vanity_url: true, code: code, temporary: false, |