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');
|
||||
c.redirect('#/tools/adminpw');
|
||||
} else {
|
||||
// Remove useless variable
|
||||
delete params['confirm_new_password'];
|
||||
// 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);
|
||||
c.api('/login', function(data) {
|
||||
// Remove useless variable
|
||||
delete params['old_password'];
|
||||
delete params['confirm_new_password'];
|
||||
|
||||
// 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