Skip to content

Commit

Permalink
Resolved IDE import errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mluypaert committed Jan 17, 2024
1 parent b1e29ea commit 139d956
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 2 additions & 0 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down
9 changes: 5 additions & 4 deletions src/wormbase/names/service.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand All @@ -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."
Expand Down
3 changes: 2 additions & 1 deletion src/wormbase/names/util.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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]))
Expand Down
4 changes: 2 additions & 2 deletions test/integration/service_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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]))
Expand All @@ -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"))))

0 comments on commit 139d956

Please sign in to comment.