innoq/spacy

create spacy.domain/edit-session function

Opened this issue · 0 comments

A rough sketch of the spacy.domain/edit-session function:

(defn edit-session [state _current-user {:keys [id title description]}]
  {:post [(s/valid? ::outcome %)]}
  {::facts [#_(some new fact containing the id and new title and description)]
   ::event (-> state
               #_(update function which updates the session either in schedule or waiting-queue ))}))

An error should possibly be produced when:

  • title & description are empty (this is also not currently checked for submit-session)
  • if the session is neither in the schedule or the waiting queue