mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 15:39:50 -05:00
Add missing predicates from httpurr.
This commit is contained in:
parent
7c92ad390a
commit
c3702f6bbe
2 changed files with 11 additions and 3 deletions
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
(ns uxbox.main.repo
|
(ns uxbox.main.repo
|
||||||
"A main interface for access to remote resources."
|
"A main interface for access to remote resources."
|
||||||
(:require [httpurr.status :as status]
|
(:require [uxbox.util.http :as http]
|
||||||
[uxbox.main.repo.auth]
|
[uxbox.main.repo.auth]
|
||||||
[uxbox.main.repo.users]
|
[uxbox.main.repo.users]
|
||||||
[uxbox.main.repo.projects]
|
[uxbox.main.repo.projects]
|
||||||
|
@ -23,5 +23,5 @@
|
||||||
([type data]
|
([type data]
|
||||||
(impl/request type data)))
|
(impl/request type data)))
|
||||||
|
|
||||||
(def client-error? status/client-error?)
|
(def client-error? http/client-error?)
|
||||||
(def server-error? status/server-error?)
|
(def server-error? http/server-error?)
|
||||||
|
|
|
@ -93,6 +93,14 @@
|
||||||
[{:keys [status]}]
|
[{:keys [status]}]
|
||||||
(<= 200 status 299))
|
(<= 200 status 299))
|
||||||
|
|
||||||
|
(defn server-error?
|
||||||
|
[{:keys [status]}]
|
||||||
|
(<= 500 status 599))
|
||||||
|
|
||||||
|
(defn client-error?
|
||||||
|
[{:keys [status]}]
|
||||||
|
(<= 400 status 499))
|
||||||
|
|
||||||
(defn send!
|
(defn send!
|
||||||
([request]
|
([request]
|
||||||
(send! request nil))
|
(send! request nil))
|
||||||
|
|
Loading…
Add table
Reference in a new issue