From 163fac88e0894b0032646227554dc37d4f5c3623 Mon Sep 17 00:00:00 2001 From: Bart Akeley Date: Fri, 17 Apr 2020 22:50:52 -0500 Subject: [PATCH] rename fooditems to products --- src/aretherecookies/app.clj | 2 +- src/aretherecookies/handler.clj | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/aretherecookies/app.clj b/src/aretherecookies/app.clj index bf3e237..32e9243 100644 --- a/src/aretherecookies/app.clj +++ b/src/aretherecookies/app.clj @@ -29,7 +29,7 @@ (POST "/faves" [] faves-get-handler) (PUT "/fave" [] faves-put-handler) (DELETE "/fave" [] faves-delete-handler) - (GET "/fooditems/:search" [] heb-search-handler)) + (GET "/products/:search" [] heb-search-handler)) (def app-config (assoc-in api-defaults [:security :anti-forgery] false)) diff --git a/src/aretherecookies/handler.clj b/src/aretherecookies/handler.clj index 2ee514d..545d9e2 100644 --- a/src/aretherecookies/handler.clj +++ b/src/aretherecookies/handler.clj @@ -162,5 +162,5 @@ (let [search (get-in req [:params :search])] (println (str "/heb/" search)) (if-not (empty? search) - (safe-json {:fooditems (memoized-search-heb search)}) - (safe-json {:fooditems []})))) + (safe-json {:products (memoized-search-heb search)}) + (safe-json {:products []}))))