Last active
December 20, 2016 22:53
-
-
Save kenbier/f2667be66a7a79bc0a5ab845d81002a2 to your computer and use it in GitHub Desktop.
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
(defmethod api-mutate 'support-request/new | |
[{:keys [blob-store twarc-scheduler | |
database current/user] :as env} | |
q | |
{:keys [history comment support-id] :as params}] | |
{:action (fn [] | |
(let [{:keys [db/id user/email]} user | |
connection (db/get-connection database) | |
session {:history history | |
:comment comment}] | |
;; Store the user session. | |
(kv/store blob-store support-id session) | |
;; Store the key to the user session. | |
@(d/transact connection [[:db/add id :user/sessions support-id]]) | |
;; Sumologic will search for this log. | |
(timbre/error "new support request recorded:" email support-id comment) | |
support-id))}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment