summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorCyberL1 <mateusz.hf18@gmail.com>2023-05-13 11:09:52 +0200
committerCyberL1 <mateusz.hf18@gmail.com>2023-05-13 11:09:52 +0200
commit6390786018f73703d2a73f0105dc29c2dfdde35b (patch)
tree4959808c65ee15fc6bbe94a75fc5e1bf6fda4c2b /src
parentMerge branch 'spacebarchat:master' into master (diff)
downloadserver-6390786018f73703d2a73f0105dc29c2dfdde35b.tar.xz
fix: add return and run prettier
Diffstat (limited to 'src')
-rw-r--r--src/api/routes/guilds/#guild_id/vanity-url.ts11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/api/routes/guilds/#guild_id/vanity-url.ts b/src/api/routes/guilds/#guild_id/vanity-url.ts
index 941f463b..a64ae2c9 100644
--- a/src/api/routes/guilds/#guild_id/vanity-url.ts
+++ b/src/api/routes/guilds/#guild_id/vanity-url.ts
@@ -108,9 +108,14 @@ router.patch(
 		});
 
 		if (!guild.features.includes("ALIASABLE_NAMES")) {
-			await Invite.update({ guild_id }, {
-				code: code
-			});
+			await Invite.update(
+				{ guild_id },
+				{
+					code: code,
+				},
+			);
+
+			return res.json({ code });
 		}
 
 		await Invite.create({