UNPKG

@lucidcms/core

Version:

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

2 lines 474 B
import{resolveMediaKeyTenant as e}from"../../../utils/media/media-key-tenant.mjs";import t from"../checks/check-has-media-strategy.mjs";const n=async(n,r)=>{let i=await t(n);if(i.error)return i;let a=await i.data.rename(n,{from:r.from,to:r.to,tenant:e(n.config,r.to)});return a.error?{error:{type:`basic`,status:500,errors:{file:{code:`media_error`,message:a.error.message}}},data:void 0}:{error:void 0,data:void 0}};export{n as default}; //# sourceMappingURL=rename.mjs.map