Last active
February 10, 2017 23:55
-
-
Save victorvoid/2e394418287f31d70e632f51a507d088 to your computer and use it in GitHub Desktop.
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
(re-frame/reg-event-db | |
:request-success-repositories | |
(fn [db [_ response]] | |
(.log js/console (:items response)) ;;; <-- I want to get it but is returning 'null'. | |
(assoc db :repositories-search-list response))) | |
(re-frame/reg-event-db | |
:request-search | |
(fn | |
[db [_ query-params]] | |
(GET | |
"https://api.github.com/search/repositories?q=teste" | |
{ | |
:handler #(re-frame/dispatch [:request-success-repositories %1]) | |
:error-handler #(js/console.log (str "error :/" %1))}))) | |
;; my app-bd: (success!) | |
;; :repositories-search-list {"total_count" 2 | |
;; "items " {...} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment