summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authordank074 <torresefrain10@gmail.com>2025-04-09 18:42:56 -0500
committerdank074 <torresefrain10@gmail.com>2025-04-09 18:42:56 -0500
commitbb84bc83e5093126898486fd550062006a678e3e (patch)
tree5d45074ab5554a10d4f10e98a37fd3b3381fe61a /src/api
parentPrettier (diff)
downloadserver-ts-bb84bc83e5093126898486fd550062006a678e3e.tar.xz
add `author` to query in pins API
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/channels/#channel_id/pins.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/api/routes/channels/#channel_id/pins.ts b/src/api/routes/channels/#channel_id/pins.ts

index f9586469e..96162870b 100644 --- a/src/api/routes/channels/#channel_id/pins.ts +++ b/src/api/routes/channels/#channel_id/pins.ts
@@ -49,6 +49,7 @@ router.put( const message = await Message.findOneOrFail({ where: { id: message_id }, + relations: ["author"], }); // * in dm channels anyone can pin messages -> only check for guilds @@ -133,6 +134,7 @@ router.delete( const message = await Message.findOneOrFail({ where: { id: message_id }, + relations: ["author"], }); if (message.guild_id) req.permission?.hasThrow("MANAGE_MESSAGES");