Skip to content

Commit

Permalink
Use correct context in routers/web (#19597)
Browse files Browse the repository at this point in the history
- Don't use the `APIContext` in the web routers.
  • Loading branch information
Gusted authored May 3, 2022
1 parent 92f139d commit cc3016f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions routers/web/user/notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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)})
}

0 comments on commit cc3016f

Please sign in to comment.