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

13 lines
327 B
JavaScript

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