delete captcha option and sudo page

This commit is contained in:
realaravinth
2021-07-20 15:22:15 +05:30
parent 00768cce34
commit db941d51b7
17 changed files with 320 additions and 34 deletions

View File

@@ -25,6 +25,16 @@ import createError from '../../../components/error/index';
//import '../forms.scss';
export const getPassword = () => {
const passwordElement = <HTMLInputElement>document.getElementById('password');
if (passwordElement === null) {
console.debug('Password is null');
return;
}
return passwordElement.value;
};
const login = async (e: Event) => {
e.preventDefault();
const loginElement = <HTMLInputElement>document.getElementById('login');
@@ -36,13 +46,7 @@ const login = async (e: Event) => {
const login = loginElement.value;
isBlankString(login, 'username', e);
const passwordElement = <HTMLInputElement>document.getElementById('password');
if (passwordElement === null) {
console.debug('Password is null');
return;
}
const password = passwordElement.value;
const password = getPassword();
const payload = {
login,