Created
July 13, 2016 19:10
-
-
Save joshuaNjordan85/2b985981f6d51db3f9d8661e9453fba5 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
(register-handler :submit-chat | |
validate-schema-mw | |
(fn [db [_ chat-msg]] | |
(let [wolo-id (:active-wolo db) | |
wolo (filter #(= (:id %) wolo-id) (:wolos db)) | |
chats (:chats wolo)] | |
(prn "what is wolo" wolo "what are chats" chats) | |
(conj chats {:usr (gensym "Testing") | |
:msg chat-msg})))) |
(def schema {:active-chat s/Any
:active-wolo s/Any ;;change this
:active-view (apply s/enum (keys views))
:wolos [{:id s/Any
:owner s/Str
:title s/Str
:start-time s/Str
:chats [{:usr s/Any
:msg s/Str}]}]})
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
let binding for wolo works find, the chats are never found