From 53115c7c17c73e34ab3798e7642f0284092064be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Dachary?= Date: Sun, 26 Nov 2023 06:33:31 +0100 Subject: [PATCH] Revert "fix POST /{username}/{reponame}/{tags,release}/delete" This reverts commit a2b1082ddaf02f0ad8deef2c9d4ee69f8415ab24. --- routers/web/repo/release.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/routers/web/repo/release.go b/routers/web/repo/release.go index 7adb22667e..8dc78079e2 100644 --- a/routers/web/repo/release.go +++ b/routers/web/repo/release.go @@ -592,17 +592,7 @@ func DeleteTag(ctx *context.Context) { } func deleteReleaseOrTag(ctx *context.Context, isDelTag bool) { - id := ctx.FormInt64("id") - rel, err := repo_model.GetReleaseByID(ctx, id) - if err != nil { - ctx.ServerError("GetRelease", err) - return - } - if ctx.Repo.Repository.ID != rel.RepoID { - ctx.NotFound("CompareRepoID", repo_model.ErrReleaseNotExist{}) - return - } - if err := releaseservice.DeleteReleaseByID(ctx, id, ctx.Doer, isDelTag); err != nil { + if err := releaseservice.DeleteReleaseByID(ctx, ctx.FormInt64("id"), ctx.Doer, isDelTag); err != nil { if models.IsErrProtectedTagName(err) { ctx.Flash.Error(ctx.Tr("repo.release.tag_name_protected")) } else {