Permalink
Browse files

Change intended to add :ns field to results returned by see-also

  • Loading branch information...
1 parent 9e6c386 commit f01c2cfbf4bad855777b55d475778f5c7dadaa7a @jafingerhut committed Mar 7, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/cd_wsapi/core.clj
View
@@ -161,7 +161,9 @@
"Given a function, format it for json."
[function]
(let [id (:id function)]
- (assoc (dissoc (into {} function) :id :doc :source :shortdoc) :url (str clojuredocs-base "/v/" id))))
+ (assoc (dissoc (into {} function) :id :doc :source :shortdoc
+ :library :library_id)
+ :url (str clojuredocs-base "/v/" id))))
(defn format-see-also
@@ -171,7 +173,7 @@
(transaction
(when-let [functions (with-query-results
rs
- ["select * from functions where id = ?" (:to_id id)]
+ ["select * from flat_functions_view where id = ?" (:to_id id)]
(doall rs))]
(format-see-also-function (first functions)))))) ; should only be 1 function per id

0 comments on commit f01c2cf

Please sign in to comment.