summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/api.go
diff options
context:
space:
mode:
authorBo-Yi Wu <appleboy.tw@gmail.com>2023-08-22 11:20:34 +0800
committerGitHub <noreply@github.com>2023-08-22 11:20:34 +0800
commit23addde28ebd69ef2c1cec6a63123c87ec8bffe9 (patch)
tree6b4327eeef013f38bc7cc332b653bbddb9b43d8d /routers/api/v1/api.go
parenta4a567f29f69e39d57a9fa7008d708f7fd080e58 (diff)
downloadgitea-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.go1
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)