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

Loading…
Cancel
Save