From c1d786b6e1a9b8562e7ea05ae08934d92abff270 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Fri, 15 Oct 2021 00:03:19 +0200 Subject: :bug: fix sticker packs --- api/src/routes/sticker-packs/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'api/src') diff --git a/api/src/routes/sticker-packs/index.ts b/api/src/routes/sticker-packs/index.ts index 89b91bdb..e6560d12 100644 --- a/api/src/routes/sticker-packs/index.ts +++ b/api/src/routes/sticker-packs/index.ts @@ -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; -- cgit 1.5.1