forked from forgejo/forgejo
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:
parent
486e4c8087
commit
791353c03b
17 changed files with 676 additions and 27 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue