mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 20:17:03 +01:00
Revert "fix POST /{username}/{reponame}/{tags,release}/delete"
This reverts commit a2b1082dda
.
This commit is contained in:
parent
98098de1f7
commit
53115c7c17
1 changed files with 1 additions and 11 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue