mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 18:38:26 +00:00
Add edit icon for changing attachment name
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user