HEX
Server: Apache
System: Linux pdx1-shared-a2-07 6.6.116-grsec-jammy-dirty #1 SMP Sat Nov 8 00:02:42 UTC 2025 x86_64
User: dh_kieuhb (23365667)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/dh_kieuhb/blwealthmanagement.com/wp-content/plugins/wp-smushit/_src/react/utils/request.js
import $ from 'jquery';
import ajaxUrl from 'ajaxUrl';

export function post(action, nonce, data = {}) {
	return new Promise(function (resolve, reject) {
		const request = Object.assign({}, {
			action: action,
			_ajax_nonce: nonce
		}, data);

		$.post(ajaxUrl, request)
			.done((response) => {
				if (response.success) {
					resolve(
						response?.data
					);
				} else {
					reject(response?.data?.message);
				}
			})
			.fail(() => reject());
	});
}