Add/update READ endpoints for assets, certs, domains, networks & software

This commit is contained in:
Marcus Hill
2022-02-05 14:20:20 +00:00
parent d4ea0c984d
commit b9bbc75ce3
6 changed files with 181 additions and 29 deletions

21
api/v1/read_output.php Normal file
View File

@@ -0,0 +1,21 @@
<?php
// Output (to be included)
if($sql && mysqli_num_rows($sql) > 0){
$return_arr['success'] = "True";
$return_arr['count'] = mysqli_num_rows($sql);
$row = array();
while($row = mysqli_fetch_array($sql)){
$return_arr['data'][] = $row;
}
echo json_encode($return_arr);
exit();
}
else{
$return_arr['success'] = "False";
$return_arr['message'] = "No resource for this company with the specified parameter(s).";
echo json_encode($return_arr);
exit();
}