summary refs log tree commit diff
diff options
context:
space:
mode:
authorIntevel ツ <59223342+Intevel@users.noreply.github.com>2021-05-08 16:48:32 +0200
committerIntevel ツ <59223342+Intevel@users.noreply.github.com>2021-05-08 16:48:32 +0200
commitf9e66f6d1d3f8964a05d8150d8167fa51e5edcb2 (patch)
tree02a8cb5fa29732b78b161fe13103c4902dab2764
parent@fosscord/server-util@1.1.5 (diff)
downloadserver-f9e66f6d1d3f8964a05d8150d8167fa51e5edcb2.tar.xz
Update index.ts
-rw-r--r--src/routes/guilds/#guild_id/index.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/routes/guilds/#guild_id/index.ts b/src/routes/guilds/#guild_id/index.ts

index e99ecbb1..4fd29f3d 100644 --- a/src/routes/guilds/#guild_id/index.ts +++ b/src/routes/guilds/#guild_id/index.ts
@@ -88,9 +88,9 @@ router.get("/vanity-url", async (req: Request, res: Response) => { const guild = await GuildModel.findOne({ id: guild_id }).exec(); if (!guild) throw new HTTPError("Guild does not exist", 404); - if(!guild.vanity_url_code) throw new HTTPError("This guild has no vanity url", 204) + if(!guild.vanity_url) throw new HTTPError("This guild has no vanity url", 204) - return res.json(guild.vanity_url_code); + return res.json(toObject(guild.vanity_url)); }); export default router;