summary refs log tree commit diff
path: root/api/src/routes/guilds/#guild_id/vanity-url.ts
diff options
context:
space:
mode:
Diffstat (limited to 'api/src/routes/guilds/#guild_id/vanity-url.ts')
-rw-r--r--api/src/routes/guilds/#guild_id/vanity-url.ts3
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,