From 25bc3d562a5b360221aa7c3fb93bc0d2f9daf2eb Mon Sep 17 00:00:00 2001 From: Giteabot Date: Sun, 29 Oct 2023 22:08:01 +0800 Subject: [PATCH] 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 --- routers/api/v1/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)