File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
src/main/com/yetanalytics/lrs/impl Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 442442
443443#_{:clj-kondo/ignore [:unused-private-var ]}
444444(defn- store-statements-sync
445- [state statements attachments]
446- (try (let [prepared-statements
445+ [ctx state statements attachments]
446+ (try (let [{version :com.yetanalytics.lrs/version } ctx
447+ prepared-statements
447448 (map
448449 (fn [s stamp]
449450 (ss/prepare-statement
450- (assoc s " stored" stamp)))
451+ (assoc s
452+ " stored" stamp
453+ " version" (case version
454+ " 1.0.3" " 1.0.0"
455+ " 2.0.0" " 2.0.0" ))))
451456 statements
452457 (timestamp/stamp-seq ))]
453458 (swap! state
885890 (-get-about [_ _ _]
886891 (get-about state))
887892 `~p/StatementsResource
888- (-store-statements [_ _ _ statements attachments]
889- (store-statements-sync state statements attachments))
893+ (-store-statements [_ ctx _ statements attachments]
894+ (store-statements-sync ctx state statements attachments))
890895 (-get-statements [_ _ _ params ltags]
891896 (get-statements-sync state xapi-path-prefix params ltags))
892897 (-consistent-through [_ _ _]
920925 (-get-about-async [lrs _ auth-identity]
921926 (a/go (get-about state)))
922927 `~p/StatementsResourceAsync
923- (-store-statements-async [lrs _ auth-identity stmts attachments]
924- (a/go (store-statements-sync state stmts attachments)))
928+ (-store-statements-async [lrs ctx auth-identity stmts attachments]
929+ (a/go (store-statements-sync ctx state stmts attachments)))
925930 (-get-statements-async [_ _ _ params ltags]
926931 (get-statements-async state xapi-path-prefix params ltags))
927932 (-consistent-through-async [_ _ _]
You can’t perform that action at this time.
0 commit comments