From 79e5716f36c54b1cec10b78601cdf849965f63a4 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 30 Dec 2021 19:43:05 +0100 Subject: [PATCH] :paperclip: Fix linter issues. --- backend/src/app/http.clj | 1 - backend/src/app/http/debug.clj | 13 +++++-------- backend/src/app/loggers/database.clj | 2 -- backend/src/app/util/websocket.clj | 2 +- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/backend/src/app/http.clj b/backend/src/app/http.clj index 7507c1eef..a88b4c346 100644 --- a/backend/src/app/http.clj +++ b/backend/src/app/http.clj @@ -12,7 +12,6 @@ [app.common.spec :as us] [app.http.doc :as doc] [app.http.errors :as errors] - [app.http.debug :as debug] [app.http.middleware :as middleware] [app.metrics :as mtx] [clojure.spec.alpha :as s] diff --git a/backend/src/app/http/debug.clj b/backend/src/app/http/debug.clj index 1456750e7..4138e2244 100644 --- a/backend/src/app/http/debug.clj +++ b/backend/src/app/http/debug.clj @@ -9,17 +9,14 @@ [app.common.data :as d] [app.common.exceptions :as ex] [app.common.spec :as us] - [app.common.transit :as t] [app.common.uuid :as uuid] - [clojure.pprint :as ppr] [app.config :as cf] [app.db :as db] - [app.util.template :as tmpl] - [clojure.java.io :as io] [app.rpc.queries.profile :as profile] [app.util.blob :as blob] - [app.util.json :as json] - [clojure.spec.alpha :as s] + [app.util.template :as tmpl] + [clojure.java.io :as io] + [clojure.pprint :as ppr] [cuerdas.core :as str] [integrant.core :as ig])) @@ -67,7 +64,7 @@ (prepare-response (some-> file :data blob/decode)))))) (defn retrieve-file-changes - [{:keys [pool]} {:keys [params path-params profile-id] :as request}] + [{:keys [pool]} request] (when-not (authorized? pool request) (ex/raise :type :authentication :code :only-admins-allowed)) @@ -143,7 +140,7 @@ ;; TODO: error list table (defmethod ig/init-key ::handlers - [_ {:keys [pool] :as cfg}] + [_ cfg] {:retrieve-file-data (partial retrieve-file-data cfg) :retrieve-file-changes (partial retrieve-file-changes cfg) :retrieve-error (partial retrieve-error cfg)}) diff --git a/backend/src/app/loggers/database.clj b/backend/src/app/loggers/database.clj index 6bbc1297e..aea476bbb 100644 --- a/backend/src/app/loggers/database.clj +++ b/backend/src/app/loggers/database.clj @@ -7,9 +7,7 @@ (ns app.loggers.database "A specific logger impl that persists errors on the database." (:require - [app.common.exceptions :as ex] [app.common.logging :as l] - [app.common.spec :as us] [app.common.uuid :as uuid] [app.config :as cf] [app.db :as db] diff --git a/backend/src/app/util/websocket.clj b/backend/src/app/util/websocket.clj index ecf1fbe58..5eb1737d6 100644 --- a/backend/src/app/util/websocket.clj +++ b/backend/src/app/util/websocket.clj @@ -67,7 +67,7 @@ created-at (dt/now) on-terminate - (fn [& args] + (fn [& _args] (when (compare-and-set! terminated false true) (call-mtx metrics :connections {:cmd :dec :by 1}) (call-mtx metrics :sessions {:val (/ (inst-ms (dt/diff created-at (dt/now))) 1000.0)})