[front/fix] truely handle 404

This commit is contained in:
SouthFox 2023-08-31 03:26:27 +08:00
parent 43ffb71113
commit 2eccdec734

View file

@ -40,7 +40,7 @@
:timeout 10000
:response-content-types {#"application/.*json" :json}
:on-success [:get-page-success]
:on-failure [:initialize-db]}
:on-failure [:get-page-failure]}
:db (-> db
(assoc-in [:loading :post] true))}))
@ -52,6 +52,13 @@
(assoc-in [:loading :post] false)
(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
:initialize-db
(fn [_ _]