From 0c0164c2e8806f17d1801bfb7317518f2e8bca6d Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Mon, 3 Mar 2025 20:54:53 +0800 Subject: [PATCH] :art: Change the api handler name of listing notifications --- pkg/internal/web/api/index.go | 2 +- pkg/internal/web/api/notifications_api.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/internal/web/api/index.go b/pkg/internal/web/api/index.go index 0b07a0a..527f7ab 100644 --- a/pkg/internal/web/api/index.go +++ b/pkg/internal/web/api/index.go @@ -19,7 +19,7 @@ func MapControllers(app *fiber.App, baseURL string) { notify := api.Group("/notifications").Name("Notifications API") { - notify.Get("/", getNotifications) + notify.Get("/", listNotification) notify.Get("/count", getNotificationCount) notify.Get("/subscription", getNotifySubscriber) notify.Post("/subscription", addNotifySubscriber) diff --git a/pkg/internal/web/api/notifications_api.go b/pkg/internal/web/api/notifications_api.go index 27c4c9e..007ccca 100644 --- a/pkg/internal/web/api/notifications_api.go +++ b/pkg/internal/web/api/notifications_api.go @@ -12,7 +12,7 @@ import ( "github.com/samber/lo" ) -func getNotifications(c *fiber.Ctx) error { +func listNotification(c *fiber.Ctx) error { take := c.QueryInt("take", 0) offset := c.QueryInt("offset", 0)