UNPKG

@lucidcms/core

Version:

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

2 lines 602 B
import{copy as e}from"../../../libs/i18n/copy.mjs";import t from"../../../libs/repositories/media.mjs";const n=async(n,r)=>{let i=Array.from(new Set(r.ids??(r.id===void 0?[]:[r.id])));if(i.length===0)return{error:void 0,data:void 0};let a=await new t(n.db.client,n.config.db).selectMultipleValidationData({ids:i,tenantKey:n.request.tenantKey,validation:{enabled:!0}});return a.error?a:a.data.length===i.length?{error:void 0,data:void 0}:{error:{type:`basic`,message:e(`server:core.media.not.found.message`),status:404},data:void 0}};export{n as default}; //# sourceMappingURL=check-media-access.mjs.map