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

15 lines
400 B
JavaScript
Raw Normal View History

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