diff options
author | Antoine GIRARD <sapk@users.noreply.github.com> | 2019-12-11 01:01:52 +0100 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-12-11 00:01:52 +0000 |
commit | c3d31e55346329a221cc0ae37d89d1fba11ea737 (patch) | |
tree | 61914ec27d02be2351a1951ada1526e9beb455db /models/attachment.go | |
parent | 50da9f7daed4fe3e8f0c76f23eeb987e97de4962 (diff) | |
download | gitea-c3d31e55346329a221cc0ae37d89d1fba11ea737.tar.gz gitea-c3d31e55346329a221cc0ae37d89d1fba11ea737.zip |
refactor(models/attachement): use getAttachmentsByUUIDs (#9317)
Diffstat (limited to 'models/attachment.go')
-rw-r--r-- | models/attachment.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/models/attachment.go b/models/attachment.go index f585bda8cb..487ddd4ad5 100644 --- a/models/attachment.go +++ b/models/attachment.go @@ -133,6 +133,11 @@ func getAttachmentByUUID(e Engine, uuid string) (*Attachment, error) { return attach, nil } +// GetAttachmentsByUUIDs returns attachment by given UUID list. +func GetAttachmentsByUUIDs(uuids []string) ([]*Attachment, error) { + return getAttachmentsByUUIDs(x, uuids) +} + func getAttachmentsByUUIDs(e Engine, uuids []string) ([]*Attachment, error) { if len(uuids) == 0 { return []*Attachment{}, nil |