Sticker pack ownership

This commit is contained in:
2025-02-23 12:02:55 +08:00
parent cfd1735aee
commit 1dae405232
6 changed files with 120 additions and 29 deletions

View File

@@ -62,10 +62,13 @@ func MapAPIs(app *fiber.App, baseURL string) {
packs := stickers.Group("/packs").Name("Sticker Packs API")
{
packs.Get("/", listStickerPacks)
packs.Get("/own", listOwnedStickerPacks)
packs.Get("/:packId", getStickerPack)
packs.Post("/", sec.ValidatorMiddleware, createStickerPack)
packs.Put("/:packId", sec.ValidatorMiddleware, updateStickerPack)
packs.Delete("/:packId", sec.ValidatorMiddleware, deleteStickerPack)
packs.Post("/:packId/own", addStickerPack)
packs.Delete("/:packId/own", removeStickerPack)
}
}
}