diff options
Diffstat (limited to 'cmd/web.go')
-rw-r--r-- | cmd/web.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/web.go b/cmd/web.go index 7ba7a7ded4..bbf386d43f 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -167,6 +167,8 @@ func runWeb(ctx *cli.Context) error { bindIgnErr := binding.BindIgnErr + m.Use(user.GetNotificationCount) + // FIXME: not all routes need go through same middlewares. // Especially some AJAX requests, we can reduce middleware number to improve performance. // Routers. @@ -577,6 +579,8 @@ func runWeb(ctx *cli.Context) error { }) // ***** END: Repository ***** + m.Get("/notifications", reqSignIn, user.Notifications) + m.Group("/api", func() { apiv1.RegisterRoutes(m) }, ignSignIn) |