S33: wire repoH.MountWebhooks
- SHA
90c8d5268800be593295ad8f6562b1b80feb0d33- Parents
-
d99c093 - Tree
7b0dac0
90c8d52
90c8d5268800be593295ad8f6562b1b80feb0d33d99c093
7b0dac0| Status | File | + | - |
|---|---|---|---|
| M |
internal/web/server.go
|
6 | 0 |
internal/web/server.gomodified@@ -201,6 +201,12 @@ func Run(ctx context.Context, opts Options) error { | ||
| 201 | 201 | repoH.MountSettingsGeneral(r) |
| 202 | 202 | }) |
| 203 | 203 | } |
| 204 | + deps.RepoWebhooksMounter = func(r chi.Router) { | |
| 205 | + r.Group(func(r chi.Router) { | |
| 206 | + r.Use(middleware.RequireUser) | |
| 207 | + repoH.MountWebhooks(r) | |
| 208 | + }) | |
| 209 | + } | |
| 204 | 210 | // Issues GETs are public (subject to policy.Can), POSTs require |
| 205 | 211 | // auth. The handler enforces auth + policy per request, so we |
| 206 | 212 | // register the whole surface in the public group; an unauth |