Skip to content

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

Some missing hook -> webhook renaming change

天舟0f4139deaf13
diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts
index 67e9a98ef1..c2d22558c4 100644
--- a/frontend/src/router/index.ts
+++ b/frontend/src/router/index.ts
@@ -445,7 +445,7 @@ const routes: Array<RouteRecordRaw> = [
props: true,
},
{
- path: "hook/new",
+ path: "webhook/new",
name: "workspace.project.hook.create",
meta: {
title: () => "Create webhook",
@@ -454,7 +454,7 @@ const routes: Array<RouteRecordRaw> = [
props: true,
},
{
- path: "hook/:projectWebhookSlug",
+ path: "webhook/:projectWebhookSlug",
name: "workspace.project.hook.detail",
meta: {
title: (route: RouteLocationNormalized) => {
diff --git a/server/acl_casbin_policy_dba.csv b/server/acl_casbin_policy_dba.csv
index acf8965f10..7f56f169cf 100644
--- a/server/acl_casbin_policy_dba.csv
+++ b/server/acl_casbin_policy_dba.csv
@@ -15,9 +15,9 @@ p, DBA, /project/{projectId}/member/{memberId}, PATCH
p, DBA, /project/{projectId}/member/{memberId}, DELETE
p, DBA, /project/{projectId}/webhook, GET
p, DBA, /project/{projectId}/webhook, POST
-p, DBA, /project/{projectId}/webhook/{hookId}, GET
-p, DBA, /project/{projectId}/webhook/{hookId}, PATCH
-p, DBA, /project/{projectId}/webhook/{hookId}, DELETE
+p, DBA, /project/{projectId}/webhook/{webhookId}, GET
+p, DBA, /project/{projectId}/webhook/{webhookId}, PATCH
+p, DBA, /project/{projectId}/webhook/{webhookId}, DELETE
p, DBA, /environment, POST
p, DBA, /environment, GET
p, DBA, /environment/{id}, PATCH
diff --git a/server/acl_casbin_policy_developer.csv b/server/acl_casbin_policy_developer.csv
index 4426cfc825..1697425e76 100644
--- a/server/acl_casbin_policy_developer.csv
+++ b/server/acl_casbin_policy_developer.csv
@@ -15,9 +15,9 @@ p, DEVELOPER, /project/{projectId}/member/{memberId}, PATCH
p, DEVELOPER, /project/{projectId}/member/{memberId}, DELETE
p, DEVELOPER, /project/{projectId}/webhook, GET
p, DEVELOPER, /project/{projectId}/webhook, POST
-p, DEVELOPER, /project/{projectId}/webhook/{hookId}, GET
-p, DEVELOPER, /project/{projectId}/webhook/{hookId}, PATCH
-p, DEVELOPER, /project/{projectId}/webhook/{hookId}, DELETE
+p, DEVELOPER, /project/{projectId}/webhook/{webhookId}, GET
+p, DEVELOPER, /project/{projectId}/webhook/{webhookId}, PATCH
+p, DEVELOPER, /project/{projectId}/webhook/{webhookId}, DELETE
p, DEVELOPER, /environment, GET
p, DEVELOPER, /instance, GET
p, DEVELOPER, /instance/{id}, GET
diff --git a/server/acl_casbin_policy_owner.csv b/server/acl_casbin_policy_owner.csv
index 2dfd5b56f7..6eb678999b 100644
--- a/server/acl_casbin_policy_owner.csv
+++ b/server/acl_casbin_policy_owner.csv
@@ -19,9 +19,9 @@ p, OWNER, /project/{projectId}/member/{memberId}, PATCH
p, OWNER, /project/{projectId}/member/{memberId}, DELETE
p, OWNER, /project/{projectId}/webhook, GET
p, OWNER, /project/{projectId}/webhook, POST
-p, OWNER, /project/{projectId}/webhook/{hookId}, GET
-p, OWNER, /project/{projectId}/webhook/{hookId}, PATCH
-p, OWNER, /project/{projectId}/webhook/{hookId}, DELETE
+p, OWNER, /project/{projectId}/webhook/{webhookId}, GET
+p, OWNER, /project/{projectId}/webhook/{webhookId}, PATCH
+p, OWNER, /project/{projectId}/webhook/{webhookId}, DELETE
p, OWNER, /environment, POST
p, OWNER, /environment, GET
p, OWNER, /environment/{id}, PATCH
diff --git a/server/project_webhook.go b/server/project_webhook.go
index a869197bb0..8c062eb57f 100644
--- a/server/project_webhook.go
+++ b/server/project_webhook.go
@@ -73,15 +73,15 @@ func (s *Server) registerProjectWebhookRoutes(g *echo.Group) {
return nil
})
- g.GET("/project/:projectId/webhook/:hookId", func(c echo.Context) error {
+ g.GET("/project/:projectId/webhook/:webhookId", func(c echo.Context) error {
_, err := strconv.Atoi(c.Param("projectId"))
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Project ID is not a number: %s", c.Param("projectId"))).SetInternal(err)
}
- id, err := strconv.Atoi(c.Param("hookId"))
+ id, err := strconv.Atoi(c.Param("webhookId"))
if err != nil {
- return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Project webhook ID is not a number: %s", c.Param("hookId"))).SetInternal(err)
+ return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Project webhook ID is not a number: %s", c.Param("webhookId"))).SetInternal(err)
}
find := &api.ProjectWebhookFind{
@@ -106,15 +106,15 @@ func (s *Server) registerProjectWebhookRoutes(g *echo.Group) {
return nil
})
- g.PATCH("/project/:projectId/webhook/:hookId", func(c echo.Context) error {
+ g.PATCH("/project/:projectId/webhook/:webhookId", func(c echo.Context) error {
_, err := strconv.Atoi(c.Param("projectId"))
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Project ID is not a number: %s", c.Param("projectId"))).SetInternal(err)
}
- id, err := strconv.Atoi(c.Param("hookId"))
+ id, err := strconv.Atoi(c.Param("webhookId"))
if err != nil {
- return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Project webhook ID is not a number: %s", c.Param("hookId"))).SetInternal(err)
+ return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Project webhook ID is not a number: %s", c.Param("webhookId"))).SetInternal(err)
}
hookPatch := &api.ProjectWebhookPatch{
@@ -147,15 +147,15 @@ func (s *Server) registerProjectWebhookRoutes(g *echo.Group) {
return nil
})
- g.DELETE("/project/:projectId/webhook/:hookId", func(c echo.Context) error {
+ g.DELETE("/project/:projectId/webhook/:webhookId", func(c echo.Context) error {
_, err := strconv.Atoi(c.Param("projectId"))
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Project ID is not a number: %s", c.Param("projectId"))).SetInternal(err)
}
- id, err := strconv.Atoi(c.Param("hookId"))
+ id, err := strconv.Atoi(c.Param("webhookId"))
if err != nil {
- return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Webhook ID is not a number: %s", c.Param("hookId"))).SetInternal(err)
+ return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Webhook ID is not a number: %s", c.Param("webhookId"))).SetInternal(err)
}
hookDelete := &api.ProjectWebhookDelete{