mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-23 17:53:23 +02:00
Merge pull request #581 from bradrydzewski/master
moving websockets to subrouter
This commit is contained in:
commit
6a6cef157f
@ -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>
|
||||
@ -97,7 +97,7 @@
|
||||
<div class="pure-u-1">
|
||||
<div>
|
||||
<h2>Public Key</h2>
|
||||
<pre class="key">{{ repo.public_key }}</pre>
|
||||
<pre class="key">{{ repo.public_key }}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -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…
x
Reference in New Issue
Block a user