diff options
author | William Carroll <wpcarro@gmail.com> | 2020-08-02T19·56+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-08-02T19·56+0100 |
commit | c2419cd9127c0077561c6f2c4c801998d231cc41 (patch) | |
tree | 3715b5e8db3615389af36821e062933f355ecbe1 /client/src/Utils.elm | |
parent | 239ff24c95458fdff0706b99b8dab9d2fc8c8386 (diff) |
Support updating trips from the client
Edit existing trips.
Diffstat (limited to 'client/src/Utils.elm')
-rw-r--r-- | client/src/Utils.elm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/client/src/Utils.elm b/client/src/Utils.elm index 28f15fb5c101..60343cd87018 100644 --- a/client/src/Utils.elm +++ b/client/src/Utils.elm @@ -77,6 +77,24 @@ deleteWithCredentials { url, body, expect } = , expect = expect } +putWithCredentials : + { url : String + , body : Http.Body + , expect : Http.Expect msg + } + -> Cmd msg +putWithCredentials { url, body, expect } = + Http.riskyRequest + { url = url + , headers = [ Http.header "Origin" Shared.clientOrigin ] + , method = "PUT" + , timeout = Nothing + , tracker = Nothing + , body = body + , expect = expect + } + + formatTime : Time.Posix -> String formatTime ts = |