MaketRandevu/assets/js/http/legal_settings_http_client.js
2022-01-18 13:05:42 +01:00

39 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
* ---------------------------------------------------------------------------- */
/**
* Legal Settings HTTP client.
*
* This module implements the legal settings related HTTP requests.
*/
App.Http.LegalSettings = (function () {
/**
* Save legal settings.
*
* @param {Object} legalSettings
*
* @return {Object}
*/
function save(legalSettings) {
const url = App.Utils.Url.siteUrl('legal_settings/save');
const data = {
csrf_token: vars('csrf_token'),
legal_settings: legalSettings
};
return $.post(url, data);
}
return {
save
};
})();