Browse Source

fix content availability check

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

Loading…
Cancel
Save