summaryrefslogtreecommitdiffstats
path: root/routers/web/user/notification.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/user/notification.go')
-rw-r--r--routers/web/user/notification.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/web/user/notification.go b/routers/web/user/notification.go
index 05421cf555..0b1789dcf8 100644
--- a/routers/web/user/notification.go
+++ b/routers/web/user/notification.go
@@ -34,7 +34,7 @@ func GetNotificationCount(c *context.Context) {
}
c.Data["NotificationUnreadCount"] = func() int64 {
- count, err := models.GetNotificationCount(c.Doer, models.NotificationStatusUnread)
+ count, err := models.GetNotificationCount(c, c.Doer, models.NotificationStatusUnread)
if err != nil {
c.ServerError("GetNotificationCount", err)
return -1
@@ -79,7 +79,7 @@ func getNotifications(c *context.Context) {
status = models.NotificationStatusUnread
}
- total, err := models.GetNotificationCount(c.Doer, status)
+ total, err := models.GetNotificationCount(c, c.Doer, status)
if err != nil {
c.ServerError("ErrGetNotificationCount", err)
return
@@ -93,7 +93,7 @@ func getNotifications(c *context.Context) {
}
statuses := []models.NotificationStatus{status, models.NotificationStatusPinned}
- notifications, err := models.NotificationsForUser(c.Doer, statuses, page, perPage)
+ notifications, err := models.NotificationsForUser(c, c.Doer, statuses, page, perPage)
if err != nil {
c.ServerError("ErrNotificationsForUser", err)
return
@@ -195,5 +195,5 @@ func NotificationPurgePost(c *context.Context) {
// NewAvailable returns the notification counts
func NewAvailable(ctx *context.Context) {
- ctx.JSON(http.StatusOK, structs.NotificationCount{New: models.CountUnread(ctx.Doer)})
+ ctx.JSON(http.StatusOK, structs.NotificationCount{New: models.CountUnread(ctx, ctx.Doer.ID)})
}