Implemented default admin account

This commit is contained in:
2021-02-11 13:18:18 +11:00
parent 01f17360b9
commit 7759a1cd40
7 changed files with 36 additions and 34 deletions
+1 -19
View File
@@ -49,15 +49,10 @@ const LogIn = props => {
);
};
//DOCS: returns two values: response and OK
const handleSubmit = async (email, password) => {
email = email.trim();
const err = handleValidation(email, password);
if (err) {
return err;
}
//generate a new formdata payload
let formData = new FormData();
@@ -73,17 +68,4 @@ const handleSubmit = async (email, password) => {
}
};
//returns an error message, or null on success
const handleValidation = (email, password) => {
if (!validateEmail(email)) {
return 'invalid email';
}
if (password.length < 8) {
return 'invalid password (Must be at least 8 characters long)';
}
return null;
};
export default LogIn;