@lucidcms/core
Version:
The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.
2 lines • 554 B
JavaScript
import e from"../../../../../constants/constants.mjs";import t from"../../../../logger/index.mjs";import n from"../../../../repositories/media.mjs";const r=async(r,i)=>{let a=i.default??[];if(a.length===0)return[];try{let e=await new n(r.db.client,r.config.db).selectMultipleValidationData({ids:a,tenantKey:r.request.tenantKey,validation:{enabled:!0}});return e.error?[]:e.data}catch{return t.error({scope:e.logScopes.validation,message:`Failed to fetch media for field validation`}),[]}};export{r as default};
//# sourceMappingURL=validate-input.mjs.map