blog->settings->addNamespace('rest'); if (is_null($core->blog->settings->rest->rest_active)) { try { $core->blog->settings->rest->put('rest_active',false,'boolean',true); $core->blog->settings->rest->put('rest_is_open',false,'boolean',true); $core->blog->settings->rest->put('rest_send_cors_headers',true,'boolean',true); $core->blog->triggerBlog(); http::redirect($p_url); } catch (Exception $e) { $core->error->add($e->getMessage()); } } // Getting current parameters $active = (boolean)$core->blog->settings->rest->rest_active; $openApi = (boolean)$core->blog->settings->rest->rest_is_open; $sendHeaders =(boolean)$core->blog->settings->rest->rest_send_cors_headers; //Sousmission Formulaire parametres if ((!empty($_POST['saveconfig'])) && ($core->auth->isSuperAdmin())) { try { $core->blog->settings->addNameSpace('rest'); $active = (empty($_POST['active'])) ? false : true; $core->blog->settings->rest->put('rest_active',$active,'boolean'); $openApi = (empty($_POST['open'])) ? false : true; $core->blog->settings->rest->put('rest_is_open',$openApi,'boolean'); $sendHeaders = (empty($_POST['sendHeaders'])) ? false : true; $core->blog->settings->rest->put('rest_send_cors_headers',$sendHeaders,'boolean'); dcPage::addSuccessNotice(__('Configuration successfully updated.')); http::redirect($p_url); }catch (Exception $e) { $core->error->add($e->getMessage()); } } //Sousmission Formulaire Reset API Key if(!empty($_POST['resetApiKey'])){ $core->blog->settings->addNameSpace('rest'); $apiKey -> new_key($core->auth->userID()); dcPage::addSuccessNotice(__('Your new key is').' '.$apiKey->key); } ?> <?php echo __('REST API configuration'); ?>

Documentation

' . __('Documentation and test interface Swagger UI') .'

'; ?>

get_dc_admin_form($core->auth->userID()); ?> auth->isSuperAdmin()): ?>

formNonce(); ?>