mirror of
https://github.com/HeyPuter/puter.git
synced 2025-02-02 23:28:39 +08:00
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:
parent
e5d4be6250
commit
66cdf98190
@ -127,7 +127,7 @@ async function UIWindowSaveAccount(options){
|
|||||||
$(el_window).find('.signup-btn').prop('disabled', true);
|
$(el_window).find('.signup-btn').prop('disabled', true);
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: api_origin + "/save_account",
|
url: window.api_origin + "/save_account",
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
async: true,
|
async: true,
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
@ -139,10 +139,10 @@ async function UIWindowSaveAccount(options){
|
|||||||
send_confirmation_code: options.send_confirmation_code,
|
send_confirmation_code: options.send_confirmation_code,
|
||||||
}),
|
}),
|
||||||
headers: {
|
headers: {
|
||||||
"Authorization": "Bearer "+auth_token
|
"Authorization": "Bearer "+window.auth_token
|
||||||
},
|
},
|
||||||
success: async function (data){
|
success: async function (data){
|
||||||
update_auth_data(data.token, data.user)
|
window.update_auth_data(data.token, data.user)
|
||||||
|
|
||||||
//close this window
|
//close this window
|
||||||
if(data.user.email_confirmation_required){
|
if(data.user.email_confirmation_required){
|
||||||
|
Loading…
Reference in New Issue
Block a user