🐛 fix invites
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { getPermission, Invite } from "@fosscord/util";
|
||||
import { getPermission, Invite, PublicInviteRelation } from "@fosscord/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
|
||||
const router = Router();
|
||||
@@ -9,7 +9,7 @@ router.get("/", async (req: Request, res: Response) => {
|
||||
const permissions = await getPermission(req.user_id, guild_id);
|
||||
permissions.hasThrow("MANAGE_GUILD");
|
||||
|
||||
const invites = await Invite.find({ guild_id });
|
||||
const invites = await Invite.find({ where: { guild_id }, relations: PublicInviteRelation });
|
||||
|
||||
return res.json(invites);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user