brotherton-erpnext/erpnext/public/js/education/academy/call.js

15 lines
396 B
JavaScript

frappe.ready(() => {
frappe.provide('academy');
academy.call = (method, args) => {
const method_path = 'erpnext.www.lms.' + method;
return new Promise((resolve, reject) => {
return frappe.call({
method: method_path,
args,
})
.then(r => resolve(r.message))
.fail(reject)
});
}
});