mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Move attachment into models/repo/ (#17650)
* Move attachment into models/repo/ * Fix test * Fix bug
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user