mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 22:06:00 +00:00
chore: Clarify use of window fields in UIWindowEmailConfirmationRequired
/puter/src/UI/UIWindowEmailConfirmationRequired.js 113:26 error 'api_origin' is not defined no-undef 121:52 error 'auth_token' is not defined no-undef 125:29 error 'logout' is not defined no-undef 131:29 error 'refresh_user_data' is not defined no-undef 160:22 error 'api_origin' is not defined no-undef 165:48 error 'auth_token' is not defined no-undef 169:25 error 'logout' is not defined no-undef 188:13 error 'logout' is not defined no-undef
This commit is contained in:
parent
2f6fcdb878
commit
dea3bc1a7f
@ -110,7 +110,7 @@ function UIWindowEmailConfirmationRequired(options){
|
||||
|
||||
setTimeout(() => {
|
||||
$.ajax({
|
||||
url: api_origin + "/confirm-email",
|
||||
url: window.api_origin + "/confirm-email",
|
||||
type: 'POST',
|
||||
data: JSON.stringify({
|
||||
code: final_code,
|
||||
@ -118,17 +118,17 @@ function UIWindowEmailConfirmationRequired(options){
|
||||
async: true,
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
"Authorization": "Bearer "+auth_token
|
||||
"Authorization": "Bearer "+window.auth_token
|
||||
},
|
||||
statusCode: {
|
||||
401: function () {
|
||||
logout();
|
||||
window.logout();
|
||||
},
|
||||
},
|
||||
success: function (res){
|
||||
if(res.email_confirmed){
|
||||
$(el_window).close();
|
||||
refresh_user_data(window.auth_token)
|
||||
window.refresh_user_data(window.auth_token)
|
||||
resolve(true);
|
||||
}else{
|
||||
$(el_window).find('.error').html('Invalid confirmation code.');
|
||||
@ -157,16 +157,16 @@ function UIWindowEmailConfirmationRequired(options){
|
||||
// send email confirmation
|
||||
$(el_window).find('.send-conf-email').on('click', function(e){
|
||||
$.ajax({
|
||||
url: api_origin + "/send-confirm-email",
|
||||
url: window.api_origin + "/send-confirm-email",
|
||||
type: 'POST',
|
||||
async: true,
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
"Authorization": "Bearer "+auth_token
|
||||
"Authorization": "Bearer "+window.auth_token
|
||||
},
|
||||
statusCode: {
|
||||
401: function () {
|
||||
logout();
|
||||
window.logout();
|
||||
},
|
||||
},
|
||||
success: async function (res){
|
||||
@ -185,7 +185,7 @@ function UIWindowEmailConfirmationRequired(options){
|
||||
|
||||
// logout
|
||||
$(el_window).find('.conf-email-log-out').on('click', function(e){
|
||||
logout();
|
||||
window.logout();
|
||||
$(el_window).close();
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user