mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
missed out the response code and header
This commit is contained in:
@ -454,7 +454,6 @@ function get_vlans() {
|
||||
$app = \Slim\Slim::getInstance();
|
||||
$router = $app->router()->getCurrentRoute()->getParams();
|
||||
$hostname = $router['hostname'];
|
||||
$status = "error";
|
||||
$code = 500;
|
||||
if(empty($hostname)) {
|
||||
$output = $output = array("status" => "error", "message" => "No hostname has been provided");
|
||||
@ -475,5 +474,7 @@ function get_vlans() {
|
||||
$output = array("status" => "error", "Device $hostname not found");
|
||||
}
|
||||
}
|
||||
$app->response->setStatus($code);
|
||||
$app->response->headers->set('Content-Type', 'application/json');
|
||||
echo _json_encode($output);
|
||||
}
|
||||
|
Reference in New Issue
Block a user