mirror of
https://github.com/go-gitea/gitea
synced 2025-07-13 14:07:20 +00:00
Add EventSource support (#11235)
If the browser supports EventSource switch to use this instead of polling notifications. Signed-off-by: Andrew Thornton art27@cantab.net
This commit is contained in:
@ -27,6 +27,7 @@ import (
|
||||
"code.gitea.io/gitea/routers/admin"
|
||||
apiv1 "code.gitea.io/gitea/routers/api/v1"
|
||||
"code.gitea.io/gitea/routers/dev"
|
||||
"code.gitea.io/gitea/routers/events"
|
||||
"code.gitea.io/gitea/routers/org"
|
||||
"code.gitea.io/gitea/routers/private"
|
||||
"code.gitea.io/gitea/routers/repo"
|
||||
@ -340,6 +341,8 @@ func RegisterRoutes(m *macaron.Macaron) {
|
||||
})
|
||||
}, reqSignOut)
|
||||
|
||||
m.Any("/user/events", reqSignIn, events.Events)
|
||||
|
||||
m.Group("/login/oauth", func() {
|
||||
m.Get("/authorize", bindIgnErr(auth.AuthorizationForm{}), user.AuthorizeOAuth)
|
||||
m.Post("/grant", bindIgnErr(auth.GrantApplicationForm{}), user.GrantApplicationOAuth)
|
||||
|
Reference in New Issue
Block a user