summaryrefslogtreecommitdiff
path: root/internal/api/client/notifications
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/client/notifications')
-rw-r--r--internal/api/client/notifications/notificationget.go2
-rw-r--r--internal/api/client/notifications/notificationsclear.go2
-rw-r--r--internal/api/client/notifications/notificationsget.go3
3 files changed, 4 insertions, 3 deletions
diff --git a/internal/api/client/notifications/notificationget.go b/internal/api/client/notifications/notificationget.go
index 98e32498b..551eeca39 100644
--- a/internal/api/client/notifications/notificationget.go
+++ b/internal/api/client/notifications/notificationget.go
@@ -83,5 +83,5 @@ func (m *Module) NotificationGETHandler(c *gin.Context) {
return
}
- c.JSON(http.StatusOK, resp)
+ apiutil.JSON(c, http.StatusOK, resp)
}
diff --git a/internal/api/client/notifications/notificationsclear.go b/internal/api/client/notifications/notificationsclear.go
index 4b63db283..2d7da3c6b 100644
--- a/internal/api/client/notifications/notificationsclear.go
+++ b/internal/api/client/notifications/notificationsclear.go
@@ -75,5 +75,5 @@ func (m *Module) NotificationsClearPOSTHandler(c *gin.Context) {
return
}
- c.JSON(http.StatusOK, struct{}{})
+ apiutil.Data(c, http.StatusOK, apiutil.AppJSON, apiutil.EmptyJSONObject)
}
diff --git a/internal/api/client/notifications/notificationsget.go b/internal/api/client/notifications/notificationsget.go
index fd175a115..da43cffec 100644
--- a/internal/api/client/notifications/notificationsget.go
+++ b/internal/api/client/notifications/notificationsget.go
@@ -155,5 +155,6 @@ func (m *Module) NotificationsGETHandler(c *gin.Context) {
if resp.LinkHeader != "" {
c.Header("Link", resp.LinkHeader)
}
- c.JSON(http.StatusOK, resp.Items)
+
+ apiutil.JSON(c, http.StatusOK, resp.Items)
}