Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Just panic

xbjiang6ee73cdc57bd
diff --git a/server/project.go b/server/project.go
index 7d4e3d434f..879cbd5c1d 100644
--- a/server/project.go
+++ b/server/project.go
@@ -160,11 +160,7 @@ func (s *Server) registerProjectRoutes(g *echo.Group) {
}
repositoryCreate.WebhookURLHost = fmt.Sprintf("%s:%d", s.host, s.port)
- v4, err := uuid.NewRandom()
- if err != nil {
- return echo.NewHTTPError(http.StatusInternalServerError, "Failed to generate uuid").SetInternal(err)
- }
- repositoryCreate.WebhookEndpointId = v4.String()
+ repositoryCreate.WebhookEndpointId = uuid.New().String()
repositoryCreate.WebhookSecretToken = bytebase.RandomString(gitlab.SECRET_TOKEN_LENGTH)
switch vcs.Type {
case "GITLAB_SELF_HOST":