diff options
author | Andrey Nering <andrey.nering@gmail.com> | 2016-12-30 16:49:54 -0200 |
---|---|---|
committer | Andrey Nering <andrey.nering@gmail.com> | 2016-12-30 16:51:24 -0200 |
commit | 6069abe5fdf49cbd9a80c9df0c136587fc8601b5 (patch) | |
tree | 01784d45072d1882ae5b4cb5208a802251e537ed /cmd | |
parent | 42904cb98a4b8e7accdac90bc9f06347cb0521f7 (diff) | |
download | gitea-6069abe5fdf49cbd9a80c9df0c136587fc8601b5.tar.gz gitea-6069abe5fdf49cbd9a80c9df0c136587fc8601b5.zip |
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 7dfd19d640..a513f589ac 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -168,6 +168,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. @@ -578,6 +580,8 @@ func runWeb(ctx *cli.Context) error { }) // ***** END: Repository ***** + m.Get("/notifications", reqSignIn, user.Notifications) + m.Group("/api", func() { apiv1.RegisterRoutes(m) }, ignSignIn) |