Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defmethod -event-msg-handler :project/add-message
- [{:keys [?data ring-req uid]}]
- (RECEIVE ?data uid ring-req
- save-message!
- :rules [authenticated?
- chat-participant?]
- :params project.routes.services.ws.schemas/SaveMessageArgs
- :return SaveMessageReturn
- :on-response
- [#(SEND % uid :chat/add-message
- update-chat-add
- :return UpdateChatAddReturn)]))
- (defmethod -event-msg-handler :project/add-request
- [{:keys [?data ring-req uid]}]
- (RECEIVE ?data uid ring-req
- save-request!
- :rules [authenticated?
- (fn [?data ring-req] (not (send-request-errors ?data)))]
- :params SaveRequestArgs
- :return SaveRequestReturn
- :on-response
- [#(SEND % uid :monitor/add-request
- monitor-add-request
- :return MonitorAddRequestReturn)
- #(SEND % uid :user-requests/add-request
- user-requests-add-request
- :return UserRequestsAddRequestReturn)]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement