From b7a06fabb34b3e2d3ddd225920d4a212cd8fd309 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 23 Feb 2025 12:20:07 +0800 Subject: [PATCH] :bug: Fix sticker pack api stacking issue --- pkg/internal/server/api/index.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/internal/server/api/index.go b/pkg/internal/server/api/index.go index 8ec183f..dba7dc2 100644 --- a/pkg/internal/server/api/index.go +++ b/pkg/internal/server/api/index.go @@ -49,16 +49,6 @@ func MapAPIs(app *fiber.App, baseURL string) { stickers := api.Group("/stickers").Name("Stickers API") { - stickers.Get("/lookup", lookupStickerBatch) - stickers.Get("/lookup/:alias", getStickerByAlias) - stickers.Get("/lookup/:alias/open", openStickerByAlias) - - stickers.Get("/", listStickers) - stickers.Get("/:stickerId", getSticker) - stickers.Post("/", sec.ValidatorMiddleware, createSticker) - stickers.Put("/:stickerId", sec.ValidatorMiddleware, updateSticker) - stickers.Delete("/:stickerId", sec.ValidatorMiddleware, deleteSticker) - packs := stickers.Group("/packs").Name("Sticker Packs API") { packs.Get("/", listStickerPacks) @@ -70,6 +60,16 @@ func MapAPIs(app *fiber.App, baseURL string) { packs.Post("/:packId/own", addStickerPack) packs.Delete("/:packId/own", removeStickerPack) } + + stickers.Get("/lookup", lookupStickerBatch) + stickers.Get("/lookup/:alias", getStickerByAlias) + stickers.Get("/lookup/:alias/open", openStickerByAlias) + + stickers.Get("/", listStickers) + stickers.Get("/:stickerId", getSticker) + stickers.Post("/", sec.ValidatorMiddleware, createSticker) + stickers.Put("/:stickerId", sec.ValidatorMiddleware, updateSticker) + stickers.Delete("/:stickerId", sec.ValidatorMiddleware, deleteSticker) } } }