mirror of
https://github.com/penpot/penpot.git
synced 2025-06-04 12:01:38 +02:00
✨ Fix all linter issues on backend code.
This commit is contained in:
parent
6dafc087e9
commit
b80295a21c
48 changed files with 134 additions and 256 deletions
|
@ -12,15 +12,13 @@
|
|||
information about the current instance and send it to the telemetry
|
||||
server."
|
||||
(:require
|
||||
[app.config :as cfg]
|
||||
[app.common.exceptions :as ex]
|
||||
[app.common.spec :as us]
|
||||
[app.common.uuid :as uuid]
|
||||
[app.config :as cfg]
|
||||
[app.db :as db]
|
||||
[app.util.http :as http]
|
||||
[app.util.json :as json]
|
||||
[clojure.spec.alpha :as s]
|
||||
[clojure.tools.logging :as log]
|
||||
[integrant.core :as ig]))
|
||||
|
||||
(declare handler)
|
||||
|
@ -60,16 +58,16 @@
|
|||
[{:keys [sprops] :as cfg}]
|
||||
(let [instance-id (:instance-id sprops)
|
||||
data (retrieve-stats cfg)
|
||||
data (assoc data :instance-id instance-id)]
|
||||
(let [response (http/send! {:method :post
|
||||
:uri (:uri cfg)
|
||||
:headers {"content-type" "application/json"}
|
||||
:body (json/encode-str data)})]
|
||||
(when (not= 200 (:status response))
|
||||
(ex/raise :type :internal
|
||||
:code :invalid-response-from-google
|
||||
:context {:status (:status response)
|
||||
:body (:body response)})))))
|
||||
data (assoc data :instance-id instance-id)
|
||||
response (http/send! {:method :post
|
||||
:uri (:uri cfg)
|
||||
:headers {"content-type" "application/json"}
|
||||
:body (json/encode-str data)})]
|
||||
(when (not= 200 (:status response))
|
||||
(ex/raise :type :internal
|
||||
:code :invalid-response-from-google
|
||||
:context {:status (:status response)
|
||||
:body (:body response)}))))
|
||||
|
||||
(defn retrieve-num-teams
|
||||
[conn]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue