[front/fix] truely handle 404
This commit is contained in:
parent
43ffb71113
commit
2eccdec734
1 changed files with 8 additions and 1 deletions
|
@ -40,7 +40,7 @@
|
||||||
:timeout 10000
|
:timeout 10000
|
||||||
:response-content-types {#"application/.*json" :json}
|
:response-content-types {#"application/.*json" :json}
|
||||||
:on-success [:get-page-success]
|
:on-success [:get-page-success]
|
||||||
:on-failure [:initialize-db]}
|
:on-failure [:get-page-failure]}
|
||||||
|
|
||||||
:db (-> db
|
:db (-> db
|
||||||
(assoc-in [:loading :post] true))}))
|
(assoc-in [:loading :post] true))}))
|
||||||
|
@ -52,6 +52,13 @@
|
||||||
(assoc-in [:loading :post] false)
|
(assoc-in [:loading :post] false)
|
||||||
(assoc :post body))))
|
(assoc :post body))))
|
||||||
|
|
||||||
|
(reg-event-db
|
||||||
|
:get-page-failure
|
||||||
|
(fn [db [_ {body :body}]]
|
||||||
|
(-> db
|
||||||
|
(assoc-in [:loading :post] false)
|
||||||
|
(assoc :post body))))
|
||||||
|
|
||||||
(reg-event-db
|
(reg-event-db
|
||||||
:initialize-db
|
:initialize-db
|
||||||
(fn [_ _]
|
(fn [_ _]
|
||||||
|
|
Loading…
Reference in a new issue