chore: Clarify usage of window fields in UIWindowSaveAccount.js

/puter/src/UI/UIWindowSaveAccount.js
  130:22  error  'api_origin' is not defined        no-undef
  142:48  error  'auth_token' is not defined        no-undef
  145:21  error  'update_auth_data' is not defined  no-undef
This commit is contained in:
Sam Atkins 2024-05-01 17:16:40 +01:00
parent e5d4be6250
commit 66cdf98190

View File

@ -127,7 +127,7 @@ async function UIWindowSaveAccount(options){
$(el_window).find('.signup-btn').prop('disabled', true);
$.ajax({
url: api_origin + "/save_account",
url: window.api_origin + "/save_account",
type: 'POST',
async: true,
contentType: "application/json",
@ -139,10 +139,10 @@ async function UIWindowSaveAccount(options){
send_confirmation_code: options.send_confirmation_code,
}),
headers: {
"Authorization": "Bearer "+auth_token
"Authorization": "Bearer "+window.auth_token
},
success: async function (data){
update_auth_data(data.token, data.user)
success: async function (data){
window.update_auth_data(data.token, data.user)
//close this window
if(data.user.email_confirmation_required){