brotherton-erpnext/erpnext/public/js/education/lms/call.js
2019-02-19 13:06:32 +05:30

15 lines
388 B
JavaScript

frappe.ready(() => {
frappe.provide('lms');
lms.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)
});
}
});