UNPKG

@lucidcms/core

Version:

The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.

2 lines 497 B
const e=async e=>{let t=e.config.collections.filter(e=>{let t=e.getData;return t.revisions&&t.revisionRetentionDays!==!1});if(t.length===0)return{error:void 0,data:void 0};let n=await Promise.all(t.map(async t=>await e.queue.add(e,{event:`document-versions:delete-expired`,payload:{collectionKey:t.key,retentionDays:t.getData.revisionRetentionDays}})));for(let e of n)if(e.error)return e;return{error:void 0,data:void 0}};export{e as default}; //# sourceMappingURL=delete-expired-revisions.mjs.map