UNPKG

@lucidcms/core

Version:

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

2 lines 625 B
import e from"../../libs/repositories/users.mjs";import{invalidateAuthCache as t}from"../auth/helpers/auth-cache.mjs";import n from"./checks/check-user-access.mjs";const r=async(r,i)=>{if(!i.ids||i.ids.length===0)return{error:void 0,data:void 0};let a=new e(r.db.client,r.config.db),o=await n(r,{ids:i.ids});if(o.error)return o;let s=await a.updateSingle({data:{is_deleted:!1,is_deleted_at:null,deleted_by:null},where:[{key:`id`,operator:`in`,value:i.ids}],returning:[`id`],validation:{enabled:!0}});return s.error?s:(await t(r),{error:void 0,data:void 0})};export{r as default}; //# sourceMappingURL=restore-multiple.mjs.map