mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-21 18:08:25 +00:00
Set the folder of an item
This commit is contained in:
@ -85,6 +85,7 @@ trait Conversions {
|
||||
data.concPerson.map(p => IdName(p.pid, p.name)),
|
||||
data.concEquip.map(e => IdName(e.eid, e.name)),
|
||||
data.inReplyTo.map(mkIdName),
|
||||
data.folder.map(mkIdName),
|
||||
data.item.dueDate,
|
||||
data.item.notes,
|
||||
data.attachments.map((mkAttachment(data) _).tupled).toList,
|
||||
|
@ -149,6 +149,13 @@ object ItemRoutes {
|
||||
resp <- Ok(Conversions.basicResult(res, "Direction updated"))
|
||||
} yield resp
|
||||
|
||||
case req @ PUT -> Root / Ident(id) / "folder" =>
|
||||
for {
|
||||
idref <- req.as[OptionalId]
|
||||
res <- backend.item.setFolder(id, idref.id, user.account.collective)
|
||||
resp <- Ok(Conversions.basicResult(res, "Folder updated"))
|
||||
} yield resp
|
||||
|
||||
case req @ PUT -> Root / Ident(id) / "corrOrg" =>
|
||||
for {
|
||||
idref <- req.as[OptionalId]
|
||||
|
Reference in New Issue
Block a user