Allow tag ids or tag names when replacing tags

This commit is contained in:
eikek
2021-07-25 21:24:08 +02:00
parent 90f19aec43
commit fcef52856a
6 changed files with 24 additions and 20 deletions

View File

@ -1783,12 +1783,12 @@ itemDetail flags id receive =
}
setTags : Flags -> String -> ReferenceList -> (Result Http.Error BasicResult -> msg) -> Cmd msg
setTags : Flags -> String -> StringList -> (Result Http.Error BasicResult -> msg) -> Cmd msg
setTags flags item tags receive =
Http2.authPut
{ url = flags.config.baseUrl ++ "/api/v1/sec/item/" ++ item ++ "/tags"
, account = getAccount flags
, body = Http.jsonBody (Api.Model.ReferenceList.encode tags)
, body = Http.jsonBody (Api.Model.StringList.encode tags)
, expect = Http.expectJson receive Api.Model.BasicResult.decoder
}