diff options
author | 6543 <6543@obermui.de> | 2021-02-07 19:32:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-07 19:32:18 +0100 |
commit | 5f248d0df290fd08ed54e31424cbb8d8517229e3 (patch) | |
tree | 99d0b8dd73d4eceed3e100a69bfa47bd7e94c723 /routers/api/v1/api.go | |
parent | 240fea8c14434f836677e6c883ef90523950ece5 (diff) | |
download | gitea-5f248d0df290fd08ed54e31424cbb8d8517229e3.tar.gz gitea-5f248d0df290fd08ed54e31424cbb8d8517229e3.zip |
[API] Add delete release by tag & fix unreleased inconsistency (#14563)
* DeleteReleaseByTag delete release not git tags
* Add api to delete tag (without release)
* fix & extend tests
* fix swagger doc
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r-- | routers/api/v1/api.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 42b52db936..9c21107a28 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -754,6 +754,7 @@ func Routes() *web.Route { }, reqToken(), reqAdmin()) m.Group("/tags", func() { m.Get("", repo.ListTags) + m.Delete("/{tag}", repo.DeleteTag) }, reqRepoReader(models.UnitTypeCode), context.ReferencesGitRepo(true)) m.Group("/keys", func() { m.Combo("").Get(repo.ListDeployKeys). @@ -862,8 +863,8 @@ func Routes() *web.Route { }) m.Group("/tags", func() { m.Combo("/{tag}"). - Get(repo.GetReleaseTag). - Delete(reqToken(), reqRepoWriter(models.UnitTypeReleases), repo.DeleteReleaseTag) + Get(repo.GetReleaseByTag). + Delete(reqToken(), reqRepoWriter(models.UnitTypeReleases), repo.DeleteReleaseByTag) }) }, reqRepoReader(models.UnitTypeReleases)) m.Post("/mirror-sync", reqToken(), reqRepoWriter(models.UnitTypeCode), repo.MirrorSync) |