@lucidcms/core
Version:
The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.
2 lines • 525 B
JavaScript
import{copy as e}from"../../i18n/copy.mjs";import t from"../../repositories/collection-migrations.mjs";const n=async(n,r)=>{let i=await new t(n.db.client,n.config.db).selectLatestByCollectionKey({collectionKey:r});return i.error?i:i.data?{data:i.data.id,error:void 0}:{data:void 0,error:{type:`basic`,name:e(`server:core.error.schema.migration.required.name`),message:e(`server:core.error.schema.migration.required.message`),status:400}}};export{n as default};
//# sourceMappingURL=get-current-collection-migration-id.mjs.map