add author
to query in pins API
This commit is contained in:
parent
126a881f31
commit
bb84bc83e5
@ -49,6 +49,7 @@ router.put(
|
|||||||
|
|
||||||
const message = await Message.findOneOrFail({
|
const message = await Message.findOneOrFail({
|
||||||
where: { id: message_id },
|
where: { id: message_id },
|
||||||
|
relations: ["author"],
|
||||||
});
|
});
|
||||||
|
|
||||||
// * in dm channels anyone can pin messages -> only check for guilds
|
// * in dm channels anyone can pin messages -> only check for guilds
|
||||||
@ -133,6 +134,7 @@ router.delete(
|
|||||||
|
|
||||||
const message = await Message.findOneOrFail({
|
const message = await Message.findOneOrFail({
|
||||||
where: { id: message_id },
|
where: { id: message_id },
|
||||||
|
relations: ["author"],
|
||||||
});
|
});
|
||||||
|
|
||||||
if (message.guild_id) req.permission?.hasThrow("MANAGE_MESSAGES");
|
if (message.guild_id) req.permission?.hasThrow("MANAGE_MESSAGES");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user