summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiteabot <teabot@gitea.io>2023-10-29 22:08:01 +0800
committerGitHub <noreply@github.com>2023-10-29 22:08:01 +0800
commit25bc3d562a5b360221aa7c3fb93bc0d2f9daf2eb (patch)
tree5e7d17b7134ef2da6df9a663fe6d86394cf451b1
parent991c959110853235d580d04abff9596cf600bff2 (diff)
downloadgitea-25bc3d562a5b360221aa7c3fb93bc0d2f9daf2eb.tar.gz
gitea-25bc3d562a5b360221aa7c3fb93bc0d2f9daf2eb.zip
Fix bad method call when deleting user secrets via API (#27829) (#27831)
Backport #27829 by @jbgomond Fixed a little mistake when you deleting user secrets via the API. Found it when working on #27725. It should be backported to 1.21 I think. Co-authored-by: Jean-Baptiste Gomond <dev@jbgomond.com>
-rw-r--r--routers/api/v1/api.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index a55fc58f21..b5619c6fbe 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -960,7 +960,7 @@ func Routes() *web.Route {
m.Group("/actions/secrets", func() {
m.Combo("/{secretname}").
Put(bind(api.CreateOrUpdateSecretOption{}), user.CreateOrUpdateSecret).
- Delete(repo.DeleteSecret)
+ Delete(user.DeleteSecret)
})
m.Get("/followers", user.ListMyFollowers)