mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-25 01:12:21 +03:00
40 lines
1 KiB
JavaScript
40 lines
1 KiB
JavaScript
|
/* ----------------------------------------------------------------------------
|
||
|
* Easy!Appointments - Online Appointment Scheduler
|
||
|
*
|
||
|
* @package EasyAppointments
|
||
|
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||
|
* @copyright Copyright (c) Alex Tselegidis
|
||
|
* @license https://opensource.org/licenses/GPL-3.0 - GPLv3
|
||
|
* @link https://easyappointments.org
|
||
|
* @since v1.5.0
|
||
|
* ---------------------------------------------------------------------------- */
|
||
|
|
||
|
/**
|
||
|
* API Settings HTTP client.
|
||
|
*
|
||
|
* This module implements the API settings related HTTP requests.
|
||
|
*/
|
||
|
App.Http.ApiSettings = (function () {
|
||
|
/**
|
||
|
* Save API settings.
|
||
|
*
|
||
|
* @param {Object} apiSettings
|
||
|
*
|
||
|
* @return {Object}
|
||
|
*/
|
||
|
function save(apiSettings) {
|
||
|
const url = App.Utils.Url.siteUrl('api_settings/save');
|
||
|
|
||
|
const data = {
|
||
|
csrf_token: vars('csrf_token'),
|
||
|
api_settings: apiSettings
|
||
|
};
|
||
|
|
||
|
return $.post(url, data);
|
||
|
}
|
||
|
|
||
|
return {
|
||
|
save
|
||
|
};
|
||
|
})();
|