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

15 lines
388 B
JavaScript
Raw Normal View History

2018-11-09 12:55:19 +00:00
frappe.ready(() => {
2018-11-13 11:17:46 +00:00
frappe.provide('lms');
2018-11-09 06:17:09 +00:00
2018-11-13 11:17:46 +00:00
lms.call = (method, args) => {
const method_path = 'erpnext.www.lms.' + method;
2018-11-09 12:55:19 +00:00
return new Promise((resolve, reject) => {
return frappe.call({
method: method_path,
args,
})
.then(r => resolve(r.message))
.fail(reject)
});
}
});