diff options
author | Samuel <34555296+Flam3rboy@users.noreply.github.com> | 2023-03-18 04:12:16 +0100 |
---|---|---|
committer | Samuel <34555296+Flam3rboy@users.noreply.github.com> | 2023-03-18 04:12:16 +0100 |
commit | 52f8508b38aa0a0aed67c3ac1fab72b35bbfe3bb (patch) | |
tree | 873186d40bc0609e821789e86a7e5865fe500e0b /src | |
parent | feat: Database Query Cache (diff) | |
download | server-52f8508b38aa0a0aed67c3ac1fab72b35bbfe3bb.tar.xz |
fix: missing id in select query
Diffstat (limited to 'src')
-rw-r--r-- | src/api/routes/guilds/#guild_id/templates.ts | 1 | ||||
-rw-r--r-- | src/util/util/Token.ts | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/api/routes/guilds/#guild_id/templates.ts b/src/api/routes/guilds/#guild_id/templates.ts index 284bbccf..7c4a6961 100644 --- a/src/api/routes/guilds/#guild_id/templates.ts +++ b/src/api/routes/guilds/#guild_id/templates.ts @@ -39,6 +39,7 @@ const TemplateGuildProjection: (keyof Guild)[] = [ "system_channel_id", "system_channel_flags", "icon", + "id", ]; router.get("/", route({}), async (req: Request, res: Response) => { diff --git a/src/util/util/Token.ts b/src/util/util/Token.ts index 67e4b879..0a8e7378 100644 --- a/src/util/util/Token.ts +++ b/src/util/util/Token.ts @@ -87,7 +87,7 @@ export function checkToken( const user = await User.findOne({ where: { id: decoded.id }, - select: ["data", "bot", "disabled", "deleted", "rights"], + select: ["id", "data", "bot", "disabled", "deleted", "rights"], }); if (!user) return rej("Invalid Token"); |