@lucidcms/core
Version:
The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.
2 lines • 490 B
JavaScript
import e from"../../libs/repositories/media-share-links.mjs";import t from"./helpers/assert-media-access.mjs";const n=async(n,r)=>{let i=await t(n,{mediaId:r.mediaId});if(i.error)return i;let a=await new e(n.db.client,n.config.db).deleteSingle({where:[{key:`id`,operator:`=`,value:r.linkId},{key:`media_id`,operator:`=`,value:r.mediaId}],returning:[`id`],validation:{enabled:!0}});return a.error?a:{error:void 0,data:void 0}};export{n as default};
//# sourceMappingURL=delete-single.mjs.map