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:
Sam Atkins
2024-05-01 16:29:52 +01:00
parent d39fd8659e
commit e3fb25cf45
+3 -3
View File
@@ -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({