Created
September 18, 2012 20:25
old and new versions of player-lookup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; old | |
(defn player-lookup [last-name] | |
(.send goog.net.XhrIo (str "/player/" last-name) | |
display-results)) | |
; new | |
(defn player-lookup [lastname] | |
(.send goog.net.XhrIo (str "/player/" lastname) | |
(fn [data] | |
(ps/publish-results (js->clj (.getResponseJson (.-target data)) :keywordize-keys true))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment