aboutsummaryrefslogtreecommitdiffstats
path: root/models/attachment.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/attachment.go')
-rw-r--r--models/attachment.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/models/attachment.go b/models/attachment.go
index 26f466a400..55a6cfc014 100644
--- a/models/attachment.go
+++ b/models/attachment.go
@@ -12,7 +12,6 @@ import (
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/storage"
- api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/timeutil"
gouuid "github.com/google/uuid"
@@ -43,19 +42,6 @@ func (a *Attachment) IncreaseDownloadCount() error {
return nil
}
-// APIFormat converts models.Attachment to api.Attachment
-func (a *Attachment) APIFormat() *api.Attachment {
- return &api.Attachment{
- ID: a.ID,
- Name: a.Name,
- Created: a.CreatedUnix.AsTime(),
- DownloadCount: a.DownloadCount,
- Size: a.Size,
- UUID: a.UUID,
- DownloadURL: a.DownloadURL(),
- }
-}
-
// AttachmentRelativePath returns the relative path
func AttachmentRelativePath(uuid string) string {
return path.Join(uuid[0:1], uuid[1:2], uuid)