diff options
author | William Carroll <wpcarro@gmail.com> | 2020-08-02T10·16+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-08-02T10·16+0100 |
commit | 699892883ceaffb64e0d9b9aaab67313a60a5428 (patch) | |
tree | c3dd3e40d3a18de274f3b0a4654137ebc3102b75 /client/src/Utils.elm | |
parent | d5bc6f963d4c8cdb8990a9946d9a142a32e13d3c (diff) |
Support deleting trips from the client
TL;DR: - Ensure Types.TripPK in Types.hs uses Calendar.Day for startDate - Prefer verbiage "GotCreateTrip" to "CreatedTrip" - Extend Utils.deleteWithCredentials to accept a body parameter - Support a delete button in the UI
Diffstat (limited to 'client/src/Utils.elm')
-rw-r--r-- | client/src/Utils.elm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/client/src/Utils.elm b/client/src/Utils.elm index 0f6c61ed286f..28f15fb5c101 100644 --- a/client/src/Utils.elm +++ b/client/src/Utils.elm @@ -62,17 +62,18 @@ postWithCredentials { url, body, expect } = deleteWithCredentials : { url : String + , body : Http.Body , expect : Http.Expect msg } -> Cmd msg -deleteWithCredentials { url, expect } = +deleteWithCredentials { url, body, expect } = Http.riskyRequest { url = url , headers = [ Http.header "Origin" Shared.clientOrigin ] , method = "DELETE" , timeout = Nothing , tracker = Nothing - , body = Http.emptyBody + , body = body , expect = expect } |