async function processPostRequest(ctx, req, res, permissions) {
  try {
    await permissions.revokeExpired();
    res.writeHead(200);
    res.end();
  } catch (error) {
    console.log(error);
    res.writeHead(500, { 'Content-Type': 'text/plain' });
    res.end((error instanceof Error) ? error.stack : JSON.stringify(error, null, 2));
  }
}
/**
 * POST -> From cronjob. Remove all expired permissions.
 */
> From cronjob. Remove all expired permissions.
> From cronjob . Remove all expired permissions .
async function processPostRequest(ctx, req, res, permissions) {
  try {
    await permissions.revokeExpired();
    res.writeHead(200);
    res.end();
  } catch (error) {
    console.log(error);
    res.writeHead(500, { 'Content-Type': 'text/plain' });
    res.end((error instanceof Error) ? error.stack : JSON.stringify(error, null, 2));
  }
}
async function processPostRequest ( ctx , req , res , permissions ) { try { await permissions . revokeExpired ( ) ; res . writeHead ( 200 ) ; res . end ( ) ; } catch ( error ) { console . log ( error ) ; res . writeHead ( 500 , { 'Content-Type' : 'text/plain' } ) ; res . end ( ( error instanceof Error ) ? error . stack : JSON . stringify ( error , null , 2 ) ) ; } }
POST -> From cronjob.
POST - > From cronjob .