mirror of
https://github.com/HeyPuter/puter.git
synced 2025-02-02 23:28:39 +08:00
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
This commit is contained in:
parent
2f30ae7a82
commit
130b57b986
@ -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){
|
||||
|
Loading…
Reference in New Issue
Block a user