logout.php 340 B

123456789
  1. <?php
  2. $app->get('/logout', function ($request, $response, $args) {
  3. $Organizr = ($request->getAttribute('Organizr')) ?? new Organizr();
  4. $Organizr->logout();
  5. $response->getBody()->write(jsonE($GLOBALS['api']));
  6. return $response
  7. ->withHeader('Content-Type', 'application/json;charset=UTF-8')
  8. ->withStatus($GLOBALS['responseCode']);
  9. });