mirror of
https://github.com/penpot/penpot.git
synced 2025-05-19 18:36:11 +02:00
📎 Fix linter issues.
This commit is contained in:
parent
9f0e156916
commit
79e5716f36
4 changed files with 6 additions and 12 deletions
|
@ -12,7 +12,6 @@
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
[app.http.doc :as doc]
|
[app.http.doc :as doc]
|
||||||
[app.http.errors :as errors]
|
[app.http.errors :as errors]
|
||||||
[app.http.debug :as debug]
|
|
||||||
[app.http.middleware :as middleware]
|
[app.http.middleware :as middleware]
|
||||||
[app.metrics :as mtx]
|
[app.metrics :as mtx]
|
||||||
[clojure.spec.alpha :as s]
|
[clojure.spec.alpha :as s]
|
||||||
|
|
|
@ -9,17 +9,14 @@
|
||||||
[app.common.data :as d]
|
[app.common.data :as d]
|
||||||
[app.common.exceptions :as ex]
|
[app.common.exceptions :as ex]
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
[app.common.transit :as t]
|
|
||||||
[app.common.uuid :as uuid]
|
[app.common.uuid :as uuid]
|
||||||
[clojure.pprint :as ppr]
|
|
||||||
[app.config :as cf]
|
[app.config :as cf]
|
||||||
[app.db :as db]
|
[app.db :as db]
|
||||||
[app.util.template :as tmpl]
|
|
||||||
[clojure.java.io :as io]
|
|
||||||
[app.rpc.queries.profile :as profile]
|
[app.rpc.queries.profile :as profile]
|
||||||
[app.util.blob :as blob]
|
[app.util.blob :as blob]
|
||||||
[app.util.json :as json]
|
[app.util.template :as tmpl]
|
||||||
[clojure.spec.alpha :as s]
|
[clojure.java.io :as io]
|
||||||
|
[clojure.pprint :as ppr]
|
||||||
[cuerdas.core :as str]
|
[cuerdas.core :as str]
|
||||||
[integrant.core :as ig]))
|
[integrant.core :as ig]))
|
||||||
|
|
||||||
|
@ -67,7 +64,7 @@
|
||||||
(prepare-response (some-> file :data blob/decode))))))
|
(prepare-response (some-> file :data blob/decode))))))
|
||||||
|
|
||||||
(defn retrieve-file-changes
|
(defn retrieve-file-changes
|
||||||
[{:keys [pool]} {:keys [params path-params profile-id] :as request}]
|
[{:keys [pool]} request]
|
||||||
(when-not (authorized? pool request)
|
(when-not (authorized? pool request)
|
||||||
(ex/raise :type :authentication
|
(ex/raise :type :authentication
|
||||||
:code :only-admins-allowed))
|
:code :only-admins-allowed))
|
||||||
|
@ -143,7 +140,7 @@
|
||||||
;; TODO: error list table
|
;; TODO: error list table
|
||||||
|
|
||||||
(defmethod ig/init-key ::handlers
|
(defmethod ig/init-key ::handlers
|
||||||
[_ {:keys [pool] :as cfg}]
|
[_ cfg]
|
||||||
{:retrieve-file-data (partial retrieve-file-data cfg)
|
{:retrieve-file-data (partial retrieve-file-data cfg)
|
||||||
:retrieve-file-changes (partial retrieve-file-changes cfg)
|
:retrieve-file-changes (partial retrieve-file-changes cfg)
|
||||||
:retrieve-error (partial retrieve-error cfg)})
|
:retrieve-error (partial retrieve-error cfg)})
|
||||||
|
|
|
@ -7,9 +7,7 @@
|
||||||
(ns app.loggers.database
|
(ns app.loggers.database
|
||||||
"A specific logger impl that persists errors on the database."
|
"A specific logger impl that persists errors on the database."
|
||||||
(:require
|
(:require
|
||||||
[app.common.exceptions :as ex]
|
|
||||||
[app.common.logging :as l]
|
[app.common.logging :as l]
|
||||||
[app.common.spec :as us]
|
|
||||||
[app.common.uuid :as uuid]
|
[app.common.uuid :as uuid]
|
||||||
[app.config :as cf]
|
[app.config :as cf]
|
||||||
[app.db :as db]
|
[app.db :as db]
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
created-at (dt/now)
|
created-at (dt/now)
|
||||||
|
|
||||||
on-terminate
|
on-terminate
|
||||||
(fn [& args]
|
(fn [& _args]
|
||||||
(when (compare-and-set! terminated false true)
|
(when (compare-and-set! terminated false true)
|
||||||
(call-mtx metrics :connections {:cmd :dec :by 1})
|
(call-mtx metrics :connections {:cmd :dec :by 1})
|
||||||
(call-mtx metrics :sessions {:val (/ (inst-ms (dt/diff created-at (dt/now))) 1000.0)})
|
(call-mtx metrics :sessions {:val (/ (inst-ms (dt/diff created-at (dt/now))) 1000.0)})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue