diff options
author | Andrey Nering <andrey.nering@gmail.com> | 2017-01-05 11:53:01 -0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-05 11:53:01 -0200 |
commit | 79d527195d98d74867a067ce93a4dace2b86d2bb (patch) | |
tree | 0dd577f8b0f28c95a7d66def7d321e3b4e65f2c3 /cmd | |
parent | 9d1bc9aac88bda13e4b9319ab915bca1b65521f6 (diff) | |
parent | b354cf362ec432533da4384d4ee0c32283b7089f (diff) | |
download | gitea-79d527195d98d74867a067ce93a4dace2b86d2bb.tar.gz gitea-79d527195d98d74867a067ce93a4dace2b86d2bb.zip |
Merge pull request #539 from andreynering/notifications-step-2
Notifications - Step 2
Diffstat (limited to 'cmd')
-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) |