mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 18:38:26 +00:00
Add correspondent organizations in item edit view
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
module Api exposing
|
||||
( addTag
|
||||
( addCorrOrg
|
||||
, addTag
|
||||
, cancelJob
|
||||
, changePassword
|
||||
, checkCalEvent
|
||||
@ -1086,6 +1087,16 @@ setCorrOrg flags item id receive =
|
||||
}
|
||||
|
||||
|
||||
addCorrOrg : Flags -> String -> Organization -> (Result Http.Error BasicResult -> msg) -> Cmd msg
|
||||
addCorrOrg flags item org receive =
|
||||
Http2.authPost
|
||||
{ url = flags.config.baseUrl ++ "/api/v1/sec/item/" ++ item ++ "/corrOrg"
|
||||
, account = getAccount flags
|
||||
, body = Http.jsonBody (Api.Model.Organization.encode org)
|
||||
, expect = Http.expectJson receive Api.Model.BasicResult.decoder
|
||||
}
|
||||
|
||||
|
||||
setCorrPerson : Flags -> String -> OptionalId -> (Result Http.Error BasicResult -> msg) -> Cmd msg
|
||||
setCorrPerson flags item id receive =
|
||||
Http2.authPut
|
||||
|
Reference in New Issue
Block a user