<?php

require('auth-validate.php');
require('../../db.php');


header('Content-Type: application/json');


$id_company = isset($_REQUEST['id']) ? $_REQUEST['id'] : null;

if(!$id_company)
{
	http_response_code(400);
	echo 'missing parameter: id';
	return;
}


$rows = getDriversByCompany($id_company);

echo json_encode($rows, JSON_PRETTY_PRINT);

?>