v1.0 Initial commit of project

This commit is contained in:
2026-01-01 10:54:18 +01:00
commit 768cf78b57
990 changed files with 241213 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?php
use api\classes\API_companies;
session_start();
require_once $_SERVER['DOCUMENT_ROOT'] . '/api/classes/API_companies.php';
# Check permissions
$API_companies = new API_companies();
if ($API_companies->request_method === 'PUT') {
$API_companies->checkPermissions('customer-companies', 'RW');
# when called from the frontend will not be forwarding to a url since when its called from the frontend it doesnt need a redirection
$API_companies->return_url = false;
$requiredFields = [
'company_uuid' => ['type' => 'uuid'],
'company_state' => ['type' => 'enum', 'values' => ['active', 'imported', 'orphaned']]
];
$API_companies->validateData($requiredFields);
$API_companies->updateCompanyState();
}