From 139d95644fff85703a49e3edd6816a697f4c5930 Mon Sep 17 00:00:00 2001 From: Manuel Luypaert Date: Wed, 17 Jan 2024 13:15:13 +0000 Subject: [PATCH] Resolved IDE import errors --- deps.edn | 2 ++ src/wormbase/names/service.clj | 9 +++++---- src/wormbase/names/util.clj | 3 ++- test/integration/service_test.clj | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/deps.edn b/deps.edn index dbc060bc..441a567d 100644 --- a/deps.edn +++ b/deps.edn @@ -21,9 +21,11 @@ metosin/compojure-api {:mvn/version "2.0.0-alpha30" :exclusions [frankiesardo/linked]} metosin/muuntaja {:mvn/version "0.6.8"} + metosin/ring-http-response {:mvn/version "0.9.3"} ikitommi/linked {:mvn/version "1.3.1-alpha1"} mount/mount {:mvn/version "0.1.17"} phrase/phrase {:mvn/version "0.3-alpha4"} + ring/ring-core {:mvn/version "1.9.4"} ring/ring-codec {:mvn/version "1.2.0"} ring/ring-defaults {:mvn/version "0.4.0"} ring/ring-jetty-adapter {:mvn/version "1.10.0"} diff --git a/src/wormbase/names/service.clj b/src/wormbase/names/service.clj index c949a641..79bd9c15 100644 --- a/src/wormbase/names/service.clj +++ b/src/wormbase/names/service.clj @@ -23,7 +23,8 @@ [ring.middleware.gzip :as ring-gzip] [ring.middleware.not-modified :as rmnm] [ring.middleware.resource :as ring-resource] - [ring.util.http-response :as http-response])) + [ring.util.http-response :as http-response] + [ring.util.response :as ring-response])) (defn- wrap-not-found "Fallback 404 handler." @@ -36,9 +37,9 @@ (http-response/not-found {:message "Resource not found (fallback)"}) :else - (-> (http-response/resource-response "client_build/index.html") - (http-response/content-type "text/html") - (http-response/status 200)))))) + (-> (ring-response/resource-response "client_build/index.html") + (ring-response/content-type "text/html") + (ring-response/status 200)))))) (def ^:private swagger-validator-url "The URL used to validate the swagger JSON produced by the application." diff --git a/src/wormbase/names/util.clj b/src/wormbase/names/util.clj index 53d4f4a7..c99dc5ff 100644 --- a/src/wormbase/names/util.clj +++ b/src/wormbase/names/util.clj @@ -9,7 +9,8 @@ [datomic.api :as d] [expound.alpha :refer [expound-str]] [phrase.alpha :as ph] - [ring.util.http-response :refer [bad-request conflict header not-found not-modified ok]] + [ring.util.http-response :refer [bad-request conflict not-found not-modified ok]] + [ring.util.response :refer [header]] [wormbase.db :as wdb] [wormbase.specs.common :as wsc] [wormbase.specs.validation :as wsv])) diff --git a/test/integration/service_test.clj b/test/integration/service_test.clj index 52634912..dcba78d8 100644 --- a/test/integration/service_test.clj +++ b/test/integration/service_test.clj @@ -2,7 +2,7 @@ (:require [clojure.test :as t] [ring.util.http-predicates :as ru-hp] - [ring.util.http-response :as http-response] + [ring.util.response :as ring-response] [wormbase.db-testing :as db-testing] [wormbase.fake-auth] [wormbase.names.service :as service])) @@ -19,5 +19,5 @@ :request-method :get})] (t/is (not (nil? response))) (t/is (ru-hp/ok? response)) - (t/is (http-response/get-header response "content-type") "text/html")))) + (t/is (ring-response/get-header response "content-type") "text/html"))))