Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
rawEventDefs = this.gcalItemsToRawEventDefs(
res.body.items,
requestParams.timeZone
)
}
if (rawEventDefs) {
let callbackRes = applyAll(ajaxSettings.success, null, [ rawEventDefs, res ])
if (Array.isArray(callbackRes)) {
rawEventDefs = callbackRes
}
onSuccess(this.parseEventDefs(rawEventDefs))
} else {
applyAll(ajaxSettings.error, null, [ error, res ])
onFailure()
}
})
}
this.calendar.popLoading()
if (res && res.body && res.body.error) {
this.reportError('Google Calendar API: ' + res.body.error.message, res.body.error.errors)
} else if (error) {
this.reportError('Google Calendar API', error)
} else {
rawEventDefs = this.gcalItemsToRawEventDefs(
res.body.items,
requestParams.timeZone
)
}
if (rawEventDefs) {
let callbackRes = applyAll(ajaxSettings.success, null, [ rawEventDefs, res ])
if (Array.isArray(callbackRes)) {
rawEventDefs = callbackRes
}
onSuccess(this.parseEventDefs(rawEventDefs))
} else {
applyAll(ajaxSettings.error, null, [ error, res ])
onFailure()
}
})
}