mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 10:54:52 +00:00
Add support for client-specific API keys
Refactoring API. Added a contact update endpoint. Small misc changes.
This commit is contained in:
@@ -5,4 +5,11 @@ if($_SERVER['REQUEST_METHOD'] !== "POST"){
|
||||
$return_arr['message'] = "Can only send POST requests to this endpoint.";
|
||||
echo json_encode($return_arr);
|
||||
exit();
|
||||
}
|
||||
|
||||
// Client ID must be specific for INSERT/UPDATE/DELETE queries
|
||||
// If this API key allows any client, set $client_id to the one specified, else leave it
|
||||
if($client_id == 0){
|
||||
//
|
||||
$client_id = intval($_POST['client_id']);
|
||||
}
|
||||
Reference in New Issue
Block a user