summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/notify/notifications.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/notify/notifications.go')
-rw-r--r--routers/api/v1/notify/notifications.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/notify/notifications.go b/routers/api/v1/notify/notifications.go
index 9dd9da85c5..1821c30377 100644
--- a/routers/api/v1/notify/notifications.go
+++ b/routers/api/v1/notify/notifications.go
@@ -22,7 +22,7 @@ func NewAvailable(ctx *context.APIContext) {
// responses:
// "200":
// "$ref": "#/responses/NotificationCount"
- ctx.JSON(http.StatusOK, api.NotificationCount{New: models.CountUnread(ctx.User)})
+ ctx.JSON(http.StatusOK, api.NotificationCount{New: models.CountUnread(ctx.Doer)})
}
func getFindNotificationOptions(ctx *context.APIContext) *models.FindNotificationOptions {
@@ -33,7 +33,7 @@ func getFindNotificationOptions(ctx *context.APIContext) *models.FindNotificatio
}
opts := &models.FindNotificationOptions{
ListOptions: utils.GetListOptions(ctx),
- UserID: ctx.User.ID,
+ UserID: ctx.Doer.ID,
UpdatedBeforeUnix: before,
UpdatedAfterUnix: since,
}