Browse Source

fix content availability check

main
ghost 9 months ago
parent
commit
1230fc2950
  1. 12
      src/server.php

12
src/server.php

@ -91,11 +91,14 @@ foreach ((array) scandir(__DIR__ . '/../host') as $host)
$config $config
); );
if ($list = $room->list())
{
$response->setContent( $response->setContent(
$room->list() $list
); );
return $response; return $response;
}
// Dynamical requests // Dynamical requests
default: default:
@ -111,16 +114,17 @@ foreach ((array) scandir(__DIR__ . '/../host') as $host)
$config $config
); );
if ($posts = $room->posts($matches[1]))
{
$response->setContent( $response->setContent(
$room->posts( $posts
$matches[1]
)
); );
return $response; return $response;
} }
} }
} }
}
// Set default response // Set default response
include_once __DIR__ . '/controller/error.php'; include_once __DIR__ . '/controller/error.php';

Loading…
Cancel
Save