problem with saving arasaac license solved

parent b8f08691
...@@ -216,9 +216,10 @@ module.exports = { ...@@ -216,9 +216,10 @@ module.exports = {
supervisor.arasaacLicense = true; supervisor.arasaacLicense = true;
delete supervisor.password; delete supervisor.password;
supervisor.save(); supervisor.save((err) => {
res.ok(); if (err) throw err;
return res.ok();
});
}) })
.catch(function (err) { .catch(function (err) {
return res.serverError(err.message ? err.message : 'Supervisor not found'); return res.serverError(err.message ? err.message : 'Supervisor not found');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment