chore: Clarify usage of window fields in UIWindowChangeUsername.js

/puter/src/UI/UIWindowChangeUsername.js
   97:18  error  'api_origin' is not defined  no-undef
  101:44  error  'auth_token' is not defined  no-undef
This commit is contained in:
Sam Atkins 2024-05-01 16:30:36 +01:00
parent e3fb25cf45
commit ff28d2919b

View File

@ -94,11 +94,11 @@ async function UIWindowChangeUsername(options){
$(el_window).find('.new-username').attr('disabled', true); $(el_window).find('.new-username').attr('disabled', true);
$.ajax({ $.ajax({
url: api_origin + "/change_username", url: window.api_origin + "/change_username",
type: 'POST', type: 'POST',
async: true, async: true,
headers: { headers: {
"Authorization": "Bearer "+auth_token "Authorization": "Bearer "+window.auth_token
}, },
contentType: "application/json", contentType: "application/json",
data: JSON.stringify({ data: JSON.stringify({