mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-31 04:52:52 +09:00
refactor(models/attachement): use getAttachmentsByUUIDs (#9317)
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user