1
0
Fork 0
forked from forgejo/forgejo

Extract actions on deletereleasebyid from models to release service (#8219)

* extract actions on deletereleasebyid from models to release service

* fix tests
This commit is contained in:
Lunny Xiao 2019-10-01 00:10:00 +08:00 committed by GitHub
parent ecd4bfd284
commit 3249c0ccba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 81 additions and 70 deletions

View file

@ -316,7 +316,7 @@ func DeleteRelease(ctx *context.APIContext) {
ctx.NotFound()
return
}
if err := models.DeleteReleaseByID(id, ctx.User, false); err != nil {
if err := releaseservice.DeleteReleaseByID(id, ctx.User, false); err != nil {
ctx.Error(500, "DeleteReleaseByID", err)
return
}