🐛 fix sticker packs

This commit is contained in:
Flam3rboy
2021-10-15 00:03:19 +02:00
parent d8f77c687e
commit fb3f957f30
3 changed files with 10 additions and 6 deletions
+4 -2
View File
@@ -1,11 +1,13 @@
import { Request, Response, Router } from "express";
import { route } from "@fosscord/api";
import { StickerPack } from "@fosscord/util/src/entities/StickerPack";
import { StickerPack } from "@fosscord/util";
const router: Router = Router();
router.get("/", route({}), async (req: Request, res: Response) => {
res.json(await StickerPack.find({}));
const sticker_packs = await StickerPack.find({ relations: ["stickers"] });
res.json({ sticker_packs });
});
export default router;