Include archive infos in item detail

This commit is contained in:
Eike Kettner
2020-03-22 21:35:50 +01:00
parent cbc95b11e6
commit 7e6eec9533
3 changed files with 14 additions and 2 deletions

View File

@ -86,6 +86,7 @@ trait Conversions {
data.item.notes,
data.attachments.map((mkAttachment(data) _).tupled).toList,
data.sources.map((mkAttachmentSource _).tupled).toList,
data.archives.map((mkAttachmentArchive _).tupled).toList,
data.tags.map(mkTag).toList
)
@ -97,6 +98,9 @@ trait Conversions {
def mkAttachmentSource(ra: RAttachmentSource, m: FileMeta): AttachmentSource =
AttachmentSource(ra.id, ra.name, m.length, MimeType.unsafe(m.mimetype.asString))
def mkAttachmentArchive(ra: RAttachmentArchive, m: FileMeta): AttachmentSource =
AttachmentSource(ra.id, ra.name, m.length, MimeType.unsafe(m.mimetype.asString))
// item list
def mkQuery(m: ItemSearch, coll: Ident): OItem.Query =