From cd0141f5b1656412263c7191c14c8360c4266a3d Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sat, 28 Dec 2024 23:56:02 +0800 Subject: [PATCH] :bug: Fix panic --- pkg/internal/server/api/index.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/internal/server/api/index.go b/pkg/internal/server/api/index.go index 62cdf65..1df7d79 100644 --- a/pkg/internal/server/api/index.go +++ b/pkg/internal/server/api/index.go @@ -27,7 +27,7 @@ func MapAPIs(app *fiber.App, baseURL string) { pools.Delete("/:id", sec.ValidatorMiddleware, deletePool) } - attachments := api.Get("/attachments").Name("Attachments API") + attachments := api.Group("/attachments").Name("Attachments API") { attachments.Get("/:attachmentId/boosts", listBoostByAttachment) @@ -39,13 +39,13 @@ func MapAPIs(app *fiber.App, baseURL string) { attachments.Delete("/:id", sec.ValidatorMiddleware, deleteAttachment) } - fragments := api.Get("/fragments").Name("Fragments API") + fragments := api.Group("/fragments").Name("Fragments API") { fragments.Post("/", sec.ValidatorMiddleware, createAttachmentFragment) fragments.Post("/:file/:chunk", sec.ValidatorMiddleware, uploadFragmentChunk) } - stickers := api.Get("/stickers").Name("Stickers API") + stickers := api.Group("/stickers").Name("Stickers API") { stickers.Get("/lookup", lookupStickerBatch) stickers.Get("/lookup/:alias", lookupSticker)