From 130b57b986affacf397ddb142916872df8d09207 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 1 May 2024 17:13:28 +0100 Subject: [PATCH] chore: Clarify usage of window fields in UIWindowRecoverPassword.js /puter/src/UI/UIWindowRecoverPassword.js 84:16 error 'is_email' is not defined no-undef 91:22 error 'api_origin' is not defined no-undef 101:25 error 'logout' is not defined no-undef --- src/UI/UIWindowRecoverPassword.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/UI/UIWindowRecoverPassword.js b/src/UI/UIWindowRecoverPassword.js index 64bc462f..87e0ec27 100644 --- a/src/UI/UIWindowRecoverPassword.js +++ b/src/UI/UIWindowRecoverPassword.js @@ -81,14 +81,14 @@ function UIWindowRecoverPassword(options){ $(el_window).find('.send-recovery-email').on('click', function(e){ let email, username; let input = $(el_window).find('.pass-recovery-username-or-email').val(); - if(is_email(input)) + if(window.is_email(input)) email = input; else username = input; // todo validation before sending $.ajax({ - url: api_origin + "/send-pass-recovery-email", + url: window.api_origin + "/send-pass-recovery-email", type: 'POST', async: true, contentType: "application/json", @@ -98,7 +98,7 @@ function UIWindowRecoverPassword(options){ }), statusCode: { 401: function () { - logout(); + window.logout(); }, }, success: async function (res){