diff options
Diffstat (limited to 'routers/api/v1/repo/release_attachment.go')
-rw-r--r-- | routers/api/v1/repo/release_attachment.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/routers/api/v1/repo/release_attachment.go b/routers/api/v1/repo/release_attachment.go index 7b63af34c8..a469877c13 100644 --- a/routers/api/v1/repo/release_attachment.go +++ b/routers/api/v1/repo/release_attachment.go @@ -7,7 +7,6 @@ package repo import ( "net/http" - "code.gitea.io/gitea/models" repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" @@ -102,9 +101,9 @@ func ListReleaseAttachments(ctx *context.APIContext) { // "$ref": "#/responses/AttachmentList" releaseID := ctx.ParamsInt64(":id") - release, err := models.GetReleaseByID(ctx, releaseID) + release, err := repo_model.GetReleaseByID(ctx, releaseID) if err != nil { - if models.IsErrReleaseNotExist(err) { + if repo_model.IsErrReleaseNotExist(err) { ctx.NotFound() return } @@ -172,9 +171,9 @@ func CreateReleaseAttachment(ctx *context.APIContext) { // Check if release exists an load release releaseID := ctx.ParamsInt64(":id") - release, err := models.GetReleaseByID(ctx, releaseID) + release, err := repo_model.GetReleaseByID(ctx, releaseID) if err != nil { - if models.IsErrReleaseNotExist(err) { + if repo_model.IsErrReleaseNotExist(err) { ctx.NotFound() return } |