Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
appServerRequest (args) {
let url = window.vcvAjaxUrl
args = Object.assign({
'vcv-nonce': window.vcvNonce,
'vcv-source-id': window.vcvSourceID
}, args)
if (env('VCV_JS_SAVE_ZIP')) {
let binaryString = deflate(JSON.stringify(args), { to: 'string' })
let encodedString = base64.encode(binaryString)
args = {
'vcv-zip': encodedString
}
}
return this.http(url).post(args)
},
appAdminServerRequest (args) {
export const checkStatus = () => {
if (!$checkContainer.length) {
return
}
const binaryString = deflate(JSON.stringify({
'vcv-action': 'settings:systemStatus:checkPayloadProcessing:adminNonce',
'vcv-nonce': window.vcvNonce,
'vcv-check-payload': generateFakeData()
}), { to: 'string' })
const encodedString = base64.encode(binaryString)
const data = {
'vcv-zip': encodedString
}
$.ajax(window.vcvAdminAjaxUrl, {
type: 'POST',
dataType: 'json',
async: true,
data: data
}).done((json) => {
if (request.status >= 200 && request.status < 400) {
successCallback(request)
} else {
if (typeof failureCallback === 'function') {
failureCallback(request)
}
}
}
request.onerror = (response) => {
if (typeof failureCallback === 'function') {
failureCallback(request)
}
}
if (env('VCV_JS_SAVE_ZIP')) {
let binaryString = deflate(JSON.stringify(data), { to: 'string' })
let encodedString = base64.encode(binaryString)
data = {
'vcv-zip': encodedString
}
}
request.send(window.jQuery.param(data))
return request
},
normalizeHtml (data) {