🐛 fix sticker packs

This commit is contained in:
Flam3rboy committed 2021-10-15 00:03:19 +02:00
1 parent 0ccc478c54
commit c1d786b6e1
3 files changed
+10 -6

No files matched your search

+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;