v1.0 Initial commit of project
This commit is contained in:
28
pub/api/v1/portalsettings/index.php
Normal file
28
pub/api/v1/portalsettings/index.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use api\classes\API_portalsettings;
|
||||
|
||||
session_start();
|
||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/api/classes/API_portalsettings.php';
|
||||
|
||||
$API_portalsettings = new API_portalsettings();
|
||||
|
||||
if ($API_portalsettings->request_method === 'PUT') {
|
||||
|
||||
# Edit the portal settings of the platform
|
||||
|
||||
$API_portalsettings->checkPermissions('admin-portalsettings', 'RW');
|
||||
|
||||
$requiredFields = [
|
||||
'portal_uuid' => ['type' => 'uuid'],
|
||||
'portal_name' => ['type' => 'string'],
|
||||
'portal_provider_name' => ['type' => 'string'],
|
||||
'admin_auth_methods' => ['type' => 'string']
|
||||
];
|
||||
|
||||
$API_portalsettings->validateData($requiredFields);
|
||||
|
||||
# Update the permission
|
||||
$API_portalsettings->updatePortalSettings();
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user