0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 07:29:08 -05:00

Add missing predicates from httpurr.

This commit is contained in:
Andrey Antukh 2016-10-12 18:54:03 +02:00
parent 7c92ad390a
commit c3702f6bbe
2 changed files with 11 additions and 3 deletions

View file

@ -6,7 +6,7 @@
(ns uxbox.main.repo
"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.users]
[uxbox.main.repo.projects]
@ -23,5 +23,5 @@
([type data]
(impl/request type data)))
(def client-error? status/client-error?)
(def server-error? status/server-error?)
(def client-error? http/client-error?)
(def server-error? http/server-error?)

View file

@ -93,6 +93,14 @@
[{:keys [status]}]
(<= 200 status 299))
(defn server-error?
[{:keys [status]}]
(<= 500 status 599))
(defn client-error?
[{:keys [status]}]
(<= 400 status 499))
(defn send!
([request]
(send! request nil))