disable authorization checks for add and update

This commit is contained in:
Bart Akeley 2018-08-25 10:49:38 -05:00
parent 7994436bed
commit ce36fafd29

View file

@ -73,7 +73,7 @@
"validate food item fields from request and insert into database returning newly created item"
[req]
(println "/addfooditem ---->" (:body req))
(if-not (authenticated? req) (throw-unauthorized))
;(if-not (authenticated? req) (throw-unauthorized))
(let [food-item (:body req) missing-keys (get-missing-keys food-item)]
(if (> (count missing-keys) 0)
(bad-request {"missingkeys" missing-keys})
@ -96,7 +96,7 @@
(defn add-image-handler
"given foodItemId from route and photo from multipart form post uploads image into s3 and adds URL into food item record"
[req]
(if-not (authenticated? req) (throw-unauthorized))
;(if-not (authenticated? req) (throw-unauthorized))
(let [username (get-in req [:params :username] "Bart Akeley")
foodItemId (get-in req [:params :foodItemId])
image (get-in req [:params :photo :tempfile])