aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2022-05-03 21:38:34 +0000
committerGitHub <noreply@github.com>2022-05-03 23:38:34 +0200
commitcc3016f70d818370b94e7c2391e96470114fb34c (patch)
tree030ebea03d15b5d3c54c6876ebe4abe8fd048f16 /routers/web
parent92f139d091c906cc6d30599101d45c62a208f585 (diff)
downloadgitea-cc3016f70d818370b94e7c2391e96470114fb34c.tar.gz
gitea-cc3016f70d818370b94e7c2391e96470114fb34c.zip
Use correct context in `routers/web` (#19597)
- Don't use the `APIContext` in the web routers.
Diffstat (limited to 'routers/web')
-rw-r--r--routers/web/user/notification.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/web/user/notification.go b/routers/web/user/notification.go
index f7848de90a..05421cf555 100644
--- a/routers/web/user/notification.go
+++ b/routers/web/user/notification.go
@@ -15,7 +15,7 @@ import (
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting"
- api "code.gitea.io/gitea/modules/structs"
+ "code.gitea.io/gitea/modules/structs"
)
const (
@@ -194,6 +194,6 @@ func NotificationPurgePost(c *context.Context) {
}
// NewAvailable returns the notification counts
-func NewAvailable(ctx *context.APIContext) {
- ctx.JSON(http.StatusOK, api.NotificationCount{New: models.CountUnread(ctx.Doer)})
+func NewAvailable(ctx *context.Context) {
+ ctx.JSON(http.StatusOK, structs.NotificationCount{New: models.CountUnread(ctx.Doer)})
}