mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-12 18:19:28 -05:00
chore: Clarify usage of window fields in UIWindowChangePassword.js
/puter/src/UI/UIWindowChangePassword.js 107:31 error 'check_password_strength' is not defined no-undef 117:18 error 'api_origin' is not defined no-undef 121:44 error 'auth_token' is not defined no-undef
This commit is contained in:
@@ -104,7 +104,7 @@ async function UIWindowChangePassword(options){
|
||||
return;
|
||||
}
|
||||
// check password strength
|
||||
const pass_strength = check_password_strength(new_password);
|
||||
const pass_strength = window.check_password_strength(new_password);
|
||||
if(!pass_strength.overallPass){
|
||||
$(el_window).find('.form-error-msg').html(i18n('password_strength_error'));
|
||||
$(el_window).find('.form-error-msg').fadeIn();
|
||||
@@ -114,11 +114,11 @@ async function UIWindowChangePassword(options){
|
||||
$(el_window).find('.form-error-msg').hide();
|
||||
|
||||
$.ajax({
|
||||
url: api_origin + "/passwd",
|
||||
url: window.api_origin + "/passwd",
|
||||
type: 'POST',
|
||||
async: true,
|
||||
headers: {
|
||||
"Authorization": "Bearer "+auth_token
|
||||
"Authorization": "Bearer "+window.auth_token
|
||||
},
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify({
|
||||
|
||||
Reference in New Issue
Block a user