mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Add route to create and associate correspondent org
This commit is contained in:
@ -100,6 +100,14 @@ object ItemRoutes {
|
||||
resp <- Ok(Conversions.basicResult(res, "Correspondent organization updated"))
|
||||
} yield resp
|
||||
|
||||
case req @ POST -> Root / Ident(id) / "corrOrg" =>
|
||||
for {
|
||||
data <- req.as[Organization]
|
||||
org <- Conversions.newOrg(data, user.account.collective)
|
||||
res <- backend.item.addCorrOrg(id, org)
|
||||
resp <- Ok(Conversions.basicResult(res, "Correspondent organization updated"))
|
||||
} yield resp
|
||||
|
||||
case req @ PUT -> Root / Ident(id) / "corrPerson" =>
|
||||
for {
|
||||
idref <- req.as[OptionalId]
|
||||
|
Reference in New Issue
Block a user