Created
October 3, 2016 17:22
-
-
Save madvas/161f91b803148c0d8d9dc382a5e3d6bc to your computer and use it in GitHub Desktop.
:contract/on-tweet-loaded
This file contains hidden or 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
(reg-event-db | |
:contract/on-tweet-loaded | |
interceptors | |
(fn [db [tweet]] | |
(update db :tweets conj (merge (select-keys tweet [:author-address :text :name]) | |
{:date (u/big-number->date-time (:date tweet)) | |
:tweet-key (.toNumber (:tweet-key tweet))})))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment