tenseleyflow/shithub / 90c8d52

Browse files

S33: wire repoH.MountWebhooks

Authored by espadonne
SHA
90c8d5268800be593295ad8f6562b1b80feb0d33
Parents
d99c093
Tree
7b0dac0

1 changed file

StatusFile+-
M internal/web/server.go 6 0
internal/web/server.gomodified
@@ -201,6 +201,12 @@ func Run(ctx context.Context, opts Options) error {
201201
 				repoH.MountSettingsGeneral(r)
202202
 			})
203203
 		}
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
+		}
204210
 		// Issues GETs are public (subject to policy.Can), POSTs require
205211
 		// auth. The handler enforces auth + policy per request, so we
206212
 		// register the whole surface in the public group; an unauth