mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-11 05:02:37 +01:00
🐛 fix vanity url
This commit is contained in:
parent
bf98804d41
commit
10913988b9
@ -10,7 +10,7 @@ router.get("/", async (req: Request, res: Response) => {
|
|||||||
const guild = await GuildModel.findOne({ id: guild_id }).exec();
|
const guild = await GuildModel.findOne({ id: guild_id }).exec();
|
||||||
if (!guild.vanity_url) 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({ vanity_url: guild.vanity_url });
|
return res.json({ vanity_url: guild.vanity_url.code });
|
||||||
});
|
});
|
||||||
|
|
||||||
export default router;
|
export default router;
|
||||||
|
Loading…
Reference in New Issue
Block a user