Skip to content

Commit

Permalink
migrfix
Browse files Browse the repository at this point in the history
  • Loading branch information
rigidus committed Apr 9, 2012
1 parent 3e7aa13 commit 40be538
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion storage/eshop.storage.asd
Expand Up @@ -21,6 +21,6 @@
(:file "lib")
(:file "classes")
(:file "render")
(:file "routes")
;; (:file "routes")
(:file "init")
))
16 changes: 8 additions & 8 deletions storage/routes.lisp
Expand Up @@ -81,11 +81,11 @@

(defun get-subways (&key (city "spb") (lang "ru"))
(let ((city-id (if (typep city 'integer)
city
(let ((dao-obj-lst (select-dao 'city (:= 'code city))))
(if (null dao-obj-lst)
(return-from get-subways "city not found")
(id (car dao-obj-lst)))))))
city
(let ((dao-obj-lst (select-dao 'city (:= 'code city))))
(if (null dao-obj-lst)
(return-from get-subways "city not found")
(id (car dao-obj-lst)))))))
(loop :for item :in (with-connection *db-spec* (select-dao 'subway (:= 'city-id city-id))) :collect
(list
(cons 'id (id item))
Expand All @@ -101,9 +101,9 @@
(format nil "{\"response\": ~A}"
(json:encode-json-to-string
(get-subways :city
(aif (hunchentoot:get-parameter "city") it "spb")
:lang
(aif (hunchentoot:get-parameter "lang") it "ru")))))
(aif (hunchentoot:get-parameter "city") it "spb")
:lang
(aif (hunchentoot:get-parameter "lang") it "ru")))))


(defun get-restaurants (&key (city "spb") subway_id age age_type latitude longitude distance limit offset sort sort_type lang)
Expand Down

0 comments on commit 40be538

Please sign in to comment.