@lucidcms/core
Version:
The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.
2 lines • 592 B
JavaScript
import{copy as e}from"../../libs/i18n/copy.mjs";import t from"../../libs/repositories/emails.mjs";const n=async(n,r)=>{let i=new t(n.db.client,n.config.db),a=await i.selectSingleById({id:r.id,tenantKey:n.request.tenantKey,validation:{enabled:!0,defaultError:{message:e(`server:core.email.not.found.message`),status:404}}});if(a.error)return a;let o=await i.deleteSingle({returning:[`id`],where:[{key:`id`,operator:`=`,value:r.id}],validation:{enabled:!0,defaultError:{status:500}}});return o.error?o:{error:void 0,data:void 0}};export{n as default};
//# sourceMappingURL=delete-single.mjs.map