Skip to content

Commit

Permalink
Deserialize json-post only if ok.
Browse files Browse the repository at this point in the history
  • Loading branch information
chr15m committed Oct 30, 2024
1 parent 0e96412 commit 0389ade
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sitefox/ui.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@
:credentials "include"
:body (js/JSON.stringify (clj->js data))}
(js->clj options :keywordize-keys true))))))
(.then (fn [res] (.json res)))))
(.then (fn [res] (when (aget res "ok") (.json res))))))

0 comments on commit 0389ade

Please sign in to comment.