Browse Source

fix content availability check

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

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

Loading…
Cancel
Save