mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[fix] Process admin password change following API modifications
This commit is contained in:
parent
9c80b7a89f
commit
251d45b7f8
1 changed files with 10 additions and 6 deletions
16
js/app.js
16
js/app.js
|
@ -1673,12 +1673,16 @@ app = Sammy('#main', function (sam) {
|
||||||
store.clear('slide');
|
store.clear('slide');
|
||||||
c.redirect('#/tools/adminpw');
|
c.redirect('#/tools/adminpw');
|
||||||
} else {
|
} else {
|
||||||
// Remove useless variable
|
c.api('/login', function(data) {
|
||||||
delete params['confirm_new_password'];
|
// Remove useless variable
|
||||||
// Update password and redirect to the home
|
delete params['old_password'];
|
||||||
c.api('/adminpw', function(data) { // http://api.yunohost.org/#!/tools/tools_adminpw_put_3
|
delete params['confirm_new_password'];
|
||||||
c.redirect('#/logout');
|
|
||||||
}, 'PUT', params);
|
// Update password and redirect to the home
|
||||||
|
c.api('/adminpw', function(data) { // http://api.yunohost.org/#!/tools/tools_adminpw_put_3
|
||||||
|
c.redirect('#/logout');
|
||||||
|
}, 'PUT', params);
|
||||||
|
}, 'POST', { 'password': params['old_password'] }, false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue