mirror of
https://github.com/lemeow125/Ivy-Frontend.git
synced 2025-05-15 19:08:11 +08:00
Added email validation to see if email exists on register page
This commit is contained in:
parent
8fdb589e67
commit
9b29f050b6
2 changed files with 30 additions and 8 deletions
|
@ -206,3 +206,19 @@ export async function CheckSavedSession() {
|
|||
console.log("No previous session found");
|
||||
return false;
|
||||
}
|
||||
|
||||
export function VerifyEmail(email: string) {
|
||||
return axios
|
||||
.get(
|
||||
"https://emailvalidation.abstractapi.com/v1/?api_key=d7abfb5f41b7476faaebe37ceba8ae37&email=" +
|
||||
email
|
||||
)
|
||||
.then((response) => {
|
||||
console.log("Email valid?" + response.data);
|
||||
return true;
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("Email valid?" + error);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue