adapt-security / adapt-authoring

A server-based user interface for authoring eLearning courses using the Adapt framework.
http://adaptlearning.org
10 stars 5 forks source link

Would be useful to add a 'date' schema keyword #274

Closed taylortom closed 3 years ago

taylortom commented 4 years ago

Whereby we could populate the default value as the current time;

Particularly useful for fields like createdAt. updatedAt

Storing dates as JS Dates would make querying a bit nicer too (i.e. performing comparisons directly on the server + remove the need to convert to Date manually)

taylortom commented 3 years ago

This has been added here: https://github.com/adapt-security/adapt-authoring-mongodb/commit/a85798263444caff6bb325d594888f824b6fe1d2 Just need to update schemas to use isDate: true where appropriate.