Write your own
export async function removeTimestamps(dataSource, collection, options) {
// ... call customization methods here
}Name
Description
Making your plugin act differently depending on the collection
export async function removeTimestamps(dataSource, collection, options) {
for (const currentCollection of dataSource.collections) {
if (currentCollection.schema.fields.createdAt) {
currentCollection.removeField('createdAt');
}
if (currentCollection.schema.fields.updatedAt) {
currentCollection.removeField('updatedAt');
}
}
}Last updated