Skip to content

Instantly share code, notes, and snippets.

@fellz
Created October 12, 2012 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fellz/3880460 to your computer and use it in GitHub Desktop.
Save fellz/3880460 to your computer and use it in GitHub Desktop.
(defn fetch-messages []
(remote (reply-messages "506e9b45e4b0cc50467f9ef2") [result]
(append ($ :#reply-messages) result))
)
(defn get-replies []
;here i make request to store data to db and then i want to fetch that data from db with fetch-messages
(remote (reply-post { :mid "506e9b45e4b0cc50467f9ef2", :reply "Hello world", :usermail "roman@gmail.com"}) [result]
(fetch-messages))
)
;here event handler
(on ($ :body) :click :#reply-but get-replies)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment