Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

A see-also API change for your consideration #4

Open
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+4 −2
Split
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