KeystoneJS, tracking updatedBy/updatedAt -
been pulling hair, google tells me nothing. can't life of me understand how intend 'track' work.
from documentation, assumed straight forward this:
truth.add({ title: { type: types.textarea, required: true } track: { updatedby: true } });
however, above solution renders this:
error: fields must specified type function
all want model store last updated item. not how 'track' intended work? missing...
you should define in list schema rather model fields.
you can either set track: true
enable meta fields or object specific ones.
var truth = new keystone.list('truth', { track: true // enables field track: {updatedby: true} // enables updatedby field });
these appear @ bottom of item page.
Comments
Post a Comment