Permalink
Browse files

Fix API routes

  • Loading branch information...
amalloy committed Oct 5, 2011
1 parent a6dce19 commit c702169cdaecd1fb71f9c5a2a2b7ab1fe1b9df2a
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/foreclojure/api.clj
View
@@ -11,8 +11,8 @@
(GET "/api/problem/:id" [id]
(when-let [problem (fetch-one :problems :where {:_id (as-int id)
:approved true})]
- (-> problem
- (dissoc :_id :approved)
- (update-each [:restricted :tags]
- #(or % ()))))))
+ {:body (-> problem
+ (dissoc :_id :approved)
+ (update-each [:restricted :tags]
+ #(or % ())))})))
(wrap-json)))

0 comments on commit c702169

Please sign in to comment.