summaryrefslogtreecommitdiffstats
path: root/modules/convert
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-11-19 21:39:57 +0800
committerGitHub <noreply@github.com>2021-11-19 21:39:57 +0800
commitfc3d0826096943b979717ed46c9a4cfd86e06106 (patch)
tree3143882ccf4dea3a8bf2a0de9c8da9a4efec26ce /modules/convert
parent7a0347315995b25bcb2dca4786504fb699b5f004 (diff)
downloadgitea-fc3d0826096943b979717ed46c9a4cfd86e06106.tar.gz
gitea-fc3d0826096943b979717ed46c9a4cfd86e06106.zip
Move attachment into models/repo/ (#17650)
* Move attachment into models/repo/ * Fix test * Fix bug
Diffstat (limited to 'modules/convert')
-rw-r--r--modules/convert/release.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/convert/release.go b/modules/convert/release.go
index 70f0d6e764..955d3ff05f 100644
--- a/modules/convert/release.go
+++ b/modules/convert/release.go
@@ -6,6 +6,7 @@ package convert
import (
"code.gitea.io/gitea/models"
+ repo_model "code.gitea.io/gitea/models/repo"
api "code.gitea.io/gitea/modules/structs"
)
@@ -35,7 +36,7 @@ func ToRelease(r *models.Release) *api.Release {
}
// ToReleaseAttachment converts models.Attachment to api.Attachment
-func ToReleaseAttachment(a *models.Attachment) *api.Attachment {
+func ToReleaseAttachment(a *repo_model.Attachment) *api.Attachment {
return &api.Attachment{
ID: a.ID,
Name: a.Name,