aboutsummaryrefslogtreecommitdiffstats
path: root/models/attachment.go
diff options
context:
space:
mode:
authorAntoine GIRARD <sapk@users.noreply.github.com>2019-12-11 01:01:52 +0100
committerzeripath <art27@cantab.net>2019-12-11 00:01:52 +0000
commitc3d31e55346329a221cc0ae37d89d1fba11ea737 (patch)
tree61914ec27d02be2351a1951ada1526e9beb455db /models/attachment.go
parent50da9f7daed4fe3e8f0c76f23eeb987e97de4962 (diff)
downloadgitea-c3d31e55346329a221cc0ae37d89d1fba11ea737.tar.gz
gitea-c3d31e55346329a221cc0ae37d89d1fba11ea737.zip
refactor(models/attachement): use getAttachmentsByUUIDs (#9317)
Diffstat (limited to 'models/attachment.go')
-rw-r--r--models/attachment.go5
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