Merge pull request #455 from wrongecho/api

Add delete asset API endpoint
This commit is contained in:
Johnny
2022-05-02 11:30:02 -04:00
committed by GitHub
6 changed files with 57 additions and 7 deletions

View File

@@ -7,7 +7,7 @@ require('../require_post_method.php');
$asset_id = intval($_POST['asset_id']);
// Default
$update_id = FALSE;
$update_count = FALSE;
if(!empty($asset_id)){
@@ -104,7 +104,7 @@ if(!empty($asset_id)){
// Check insert & get insert ID
if($update_sql){
$update_id = mysqli_affected_rows($mysqli);
$update_count = mysqli_affected_rows($mysqli);
//Logging
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Asset', log_action = 'Updated', log_description = '$name via API ($api_key_name)', log_ip = '$ip', log_client_id = $client_id, company_id = $company_id");