Merge pull request #581 from bradrydzewski/master
moving websockets to subrouter
This commit is contained in:
commit
6a6cef157f
3 changed files with 8 additions and 4 deletions
|
@ -1039,6 +1039,7 @@ nav {
|
|||
color:#666;
|
||||
line-height:22px;
|
||||
font-size:14px;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<h2>Status Badge</h2>
|
||||
</div>
|
||||
<div class="pure-u-1">
|
||||
<div class="markdown">{{ repo | badgeMarkdown }}</div>
|
||||
<pre class="markdown">{{ repo | badgeMarkdown }}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
@ -11,8 +11,6 @@ func New() *web.Mux {
|
|||
mux := web.New()
|
||||
|
||||
mux.Get("/api/logins", handler.GetLoginList)
|
||||
mux.Get("/api/stream/stdout/:id", handler.WsConsole)
|
||||
mux.Get("/api/stream/user", handler.WsUser)
|
||||
mux.Get("/api/auth/:host", handler.GetLogin)
|
||||
mux.Post("/api/auth/:host", handler.GetLogin)
|
||||
mux.Get("/api/badge/:host/:owner/:name/status.svg", handler.GetBadge)
|
||||
|
@ -21,6 +19,11 @@ func New() *web.Mux {
|
|||
mux.Put("/api/hook/:host", handler.PostHook)
|
||||
mux.Post("/api/hook/:host", handler.PostHook)
|
||||
|
||||
streams := web.New()
|
||||
streams.Get("/api/stream/stdout/:id", handler.WsConsole)
|
||||
streams.Get("/api/stream/user", handler.WsUser)
|
||||
mux.Handle("/api/stream/*", streams)
|
||||
|
||||
repos := web.New()
|
||||
repos.Use(middleware.SetRepo)
|
||||
repos.Use(middleware.RequireRepoRead)
|
||||
|
|
Loading…
Reference in a new issue