brotherton-erpnext/erpnext/public/js/education/lms/call.js
2019-04-09 12:57:56 +05:30

15 lines
303 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);
});
};
});