+13
-9
knotserver/routes.go
+13
-9
knotserver/routes.go
···
674
674
return
675
675
}
676
676
677
-
err = hook.SetupRepo(hook.Config(
678
-
hook.WithScanPath(h.c.Repo.ScanPath),
679
-
hook.WithInternalApi(h.c.Server.InternalListenAddr),
680
-
),
677
+
hook.SetupRepo(
678
+
hook.Config(
679
+
hook.WithScanPath(h.c.Repo.ScanPath),
680
+
hook.WithInternalApi(h.c.Server.InternalListenAddr),
681
+
),
681
682
repoPath,
682
683
)
683
-
if err != nil {
684
-
l.Error("setting up hooks", "error", err.Error())
685
-
writeError(w, err.Error(), http.StatusInternalServerError)
686
-
return
687
-
}
688
684
689
685
w.WriteHeader(http.StatusNoContent)
690
686
}
···
933
929
writeError(w, err.Error(), http.StatusInternalServerError)
934
930
return
935
931
}
932
+
933
+
hook.SetupRepo(
934
+
hook.Config(
935
+
hook.WithScanPath(h.c.Repo.ScanPath),
936
+
hook.WithInternalApi(h.c.Server.InternalListenAddr),
937
+
),
938
+
repoPath,
939
+
)
936
940
937
941
w.WriteHeader(http.StatusNoContent)
938
942
}