Skip to content

Commit 3c29008

Browse files
committed
test with ngrok
1 parent f35e00c commit 3c29008

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/meetcute/routes.clj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@
22
(:require [compojure.core :as compo :refer [defroutes GET POST ANY]]
33
[compojure.route :as route]
44
[clojure.java.io :as io]
5+
[clojure.string :as str]
56
[cheshire.core :as json]
67
[meetcute.logic :as logic]
78
[smallworld.util :as sw-util]
89
[meetcute.auth :as mc.auth]
910
[meetcute.util :as mc.util]
1011
[ring.util.mime-type :as mime]
1112
[ring.util.request]
12-
[ring.util.response :as resp]
13-
[cheshire.core :refer [generate-string]]
14-
[clojure.string :as str]
15-
[smallworld.airtable :as airtable]))
13+
[ring.util.response :as resp]))
1614

1715
(defn parse-body-params [body]
1816
(json/parse-string body true))
@@ -54,7 +52,9 @@
5452
(defn tmp-file-path [file]
5553
(if (= (:prod sw-util/ENVIRONMENTS) (sw-util/get-env-var "ENVIRONMENT"))
5654
(str "https://smallworld.kiwi/tmp/" (:filename file))
57-
(str "https://7138-186-177-83-218.ngrok-free.app/tmp/" (:filename file))))
55+
(do
56+
(println "<NGROK> you are using ngrok to upload files. Have you changed the ngrok URL? </NGROK>")
57+
(str " https://b15f-137-103-250-209.ngrok-free.app/tmp/" (:filename file)))))
5858

5959
(defn tmp-upload-handler [request]
6060
(try
@@ -106,7 +106,7 @@
106106
(ANY "/api/echo" req (resp/response (pr-str req)))
107107
(POST "/api/matchmaking/me" req (let [parsed-jwt (mc.auth/req->parsed-jwt req)]
108108
(assert parsed-jwt)
109-
(generate-string {:fields (logic/my-profile parsed-jwt)})))
109+
(json/generate-string {:fields (logic/my-profile parsed-jwt)})))
110110
(GET "/api/get-airtable-db-name" _ (json/generate-string (logic/get-airtable-db-name)))
111111
(POST "/api/admin/update-airtable-db" req (logic/update-airtable-db req))
112112
(POST "/api/refresh-todays-cutie" req (let [parsed-body (:params req)

0 commit comments

Comments
 (0)