Add edit icon for changing attachment name

This commit is contained in:
Eike Kettner
2020-06-14 14:38:56 +02:00
parent 84a26461ed
commit 0643534994
4 changed files with 218 additions and 18 deletions

View File

@ -61,6 +61,7 @@ module Api exposing
, refreshSession
, register
, sendMail
, setAttachmentName
, setCollectiveSettings
, setConcEquip
, setConcPerson
@ -1061,6 +1062,21 @@ getJobQueueStateTask flags =
--- Item
setAttachmentName :
Flags
-> String
-> Maybe String
-> (Result Http.Error BasicResult -> msg)
-> Cmd msg
setAttachmentName flags attachId newName receive =
Http2.authPost
{ url = flags.config.baseUrl ++ "/api/v1/sec/attachment/" ++ attachId ++ "/name"
, account = getAccount flags
, body = Http.jsonBody (Api.Model.OptionalText.encode (OptionalText newName))
, expect = Http.expectJson receive Api.Model.BasicResult.decoder
}
moveAttachmentBefore :
Flags
-> String