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

15 lines
303 B
JavaScript
Raw Normal View History

2018-11-09 12:55:19 +00:00
frappe.ready(() => {
2019-04-09 07:27:56 +00:00
frappe.provide('lms');
2018-11-09 06:17:09 +00:00
2019-04-09 07:27:56 +00:00
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);
});
};
2018-11-09 12:55:19 +00:00
});