mirror of
https://github.com/penpot/penpot.git
synced 2025-05-29 13:26:12 +02:00
Simplify error handling on events that communicate with backend.
This commit is contained in:
parent
47a70ad5c9
commit
6d2cd7da59
9 changed files with 63 additions and 121 deletions
|
@ -7,17 +7,21 @@
|
|||
(ns uxbox.repo
|
||||
"A main interface for access to remote resources."
|
||||
(:refer-clojure :exclude [do])
|
||||
(:require [uxbox.repo.core :refer (request)]
|
||||
(:require [uxbox.repo.core :as core]
|
||||
[uxbox.repo.auth]
|
||||
[uxbox.repo.users]
|
||||
[uxbox.repo.projects]
|
||||
[uxbox.repo.pages]
|
||||
[httpurr.status :as status]
|
||||
[beicon.core :as rx]))
|
||||
|
||||
(defn req
|
||||
"Perform a side effectfull action accesing
|
||||
remote resources."
|
||||
([type]
|
||||
(request type nil))
|
||||
(core/request type nil))
|
||||
([type data]
|
||||
(request type data)))
|
||||
(core/request type data)))
|
||||
|
||||
(def client-error? status/client-error?)
|
||||
(def server-error? status/server-error?)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue