diff options
author | Bo-Yi Wu <appleboy.tw@gmail.com> | 2023-08-22 11:20:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-22 11:20:34 +0800 |
commit | 23addde28ebd69ef2c1cec6a63123c87ec8bffe9 (patch) | |
tree | 6b4327eeef013f38bc7cc332b653bbddb9b43d8d /routers/api/v1/api.go | |
parent | a4a567f29f69e39d57a9fa7008d708f7fd080e58 (diff) | |
download | gitea-23addde28ebd69ef2c1cec6a63123c87ec8bffe9.tar.gz gitea-23addde28ebd69ef2c1cec6a63123c87ec8bffe9.zip |
feat: implement organization secret creation API (#26566)
- Add a new `CreateSecretOption` struct for creating secrets
- Implement a `CreateOrgSecret` function to create a secret in an
organization
- Add a new route in `api.go` to handle the creation of organization
secrets
- Update the Swagger template to include the new `CreateOrgSecret` API
endpoint
---------
Signed-off-by: appleboy <appleboy.tw@gmail.com>
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r-- | routers/api/v1/api.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index ccae83a940..9613bd610d 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -1300,6 +1300,7 @@ func Routes() *web.Route { }) m.Group("/actions/secrets", func() { m.Get("", reqToken(), reqOrgOwnership(), org.ListActionsSecrets) + m.Post("", reqToken(), reqOrgOwnership(), bind(api.CreateSecretOption{}), org.CreateOrgSecret) }) m.Group("/public_members", func() { m.Get("", org.ListPublicMembers) |