icon.php 427 B

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