diff --git a/src/UI/UIWindowEmailConfirmationRequired.js b/src/UI/UIWindowEmailConfirmationRequired.js index 46bba008..4c472f7f 100644 --- a/src/UI/UIWindowEmailConfirmationRequired.js +++ b/src/UI/UIWindowEmailConfirmationRequired.js @@ -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(); })