<?php

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


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

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


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


$rows = getRowsByCompany($id_company);

echo json_encode($rows, JSON_PRETTY_PRINT);

?>