refactor(models/attachement): use getAttachmentsByUUIDs (#9317)

This commit is contained in:
Antoine GIRARD authored and zeripath committed 2019-12-11 00:01:52 +00:00
1 parent 50da9f7dae
commit c3d31e5534
4 files changed
+23 -20

No files matched your search

+5
View File
@@ -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