summaryrefslogtreecommitdiff
path: root/internal/api/client/notification/notificationsget.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/client/notification/notificationsget.go')
-rw-r--r--internal/api/client/notification/notificationsget.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/api/client/notification/notificationsget.go b/internal/api/client/notification/notificationsget.go
index 0a56ee80b..b6f7cdd01 100644
--- a/internal/api/client/notification/notificationsget.go
+++ b/internal/api/client/notification/notificationsget.go
@@ -74,12 +74,15 @@ func (m *Module) NotificationsGETHandler(c *gin.Context) {
sinceID = sinceIDString
}
- notifs, errWithCode := m.processor.NotificationsGet(c.Request.Context(), authed, limit, maxID, sinceID)
+ resp, errWithCode := m.processor.NotificationsGet(c.Request.Context(), authed, limit, maxID, sinceID)
if errWithCode != nil {
l.Debugf("error processing notifications get: %s", errWithCode.Error())
c.JSON(errWithCode.Code(), gin.H{"error": errWithCode.Safe()})
return
}
- c.JSON(http.StatusOK, notifs)
+ if resp.LinkHeader != "" {
+ c.Header("Link", resp.LinkHeader)
+ }
+ c.JSON(http.StatusOK, resp.Items)
}