Updated the guilds.ts route
This commit is contained in:
parent
c62594a59b
commit
82eb156712
@ -11,9 +11,8 @@ app.get("/", hasRank(Rank.USER), async (req: AuthenticatedRequest, res: Response
|
||||
res.json(guilds
|
||||
.filter((guild) => guild.owner || (guild.permissions && (guild.permissions & 0x8)))
|
||||
.map((guild) => ({id: guild.id, name: guild.name, icon: guild.icon})));
|
||||
}).catch((e) => {
|
||||
console.log(e)
|
||||
res.status(500).json({message: "An internal error occurred"})
|
||||
}).catch(() => {
|
||||
res.status(500).json({message: "An internal error occurred"});
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user