♻️ Major refactor of page data structure.

In preparation to future collaborative edition.
This commit is contained in:
Andrey Antukh 2019-12-04 20:13:35 +01:00
parent 8c4bdc3f31
commit af62d949d8
33 changed files with 1025 additions and 1124 deletions

View file

@ -42,7 +42,7 @@
(let [data (:body-params req)
user-agent (get-in req [:headers "user-agent"])]
(-> (sm/handle (assoc data ::sm/type :login))
(p/then #(session/create % user-agent))
(p/then #(session/create (:id %) user-agent))
(p/then' (fn [token]
{:status 204
:cookies {"auth-token" {:value token}}