UNPKG

@lucidcms/core

Version:

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

2 lines 486 B
import e from"../../constants/constants.mjs";import t from"../../libs/repositories/user-tokens.mjs";const n=async n=>{let r=new t(n.db.client,n.config.db),i=new Date().toISOString(),a=await r.updateMultiple({data:{revoked_at:i,revoke_reason:e.userTokenRevokeReasons.expired},where:[{key:`expiry_date`,operator:`<`,value:i},{key:`revoked_at`,operator:`is`,value:null}]});return a.error?a:{error:void 0,data:void 0}};export{n as default}; //# sourceMappingURL=clear-expired-tokens.mjs.map