Skip to content
Snippets Groups Projects
Commit 174f5ddf authored by charclayt's avatar charclayt
Browse files

added alerts

Alerts for invalid username or password added
parent 30fa173a
No related branches found
No related tags found
No related merge requests found
...@@ -43,13 +43,16 @@ function loginUser(username, password) { ...@@ -43,13 +43,16 @@ function loginUser(username, password) {
resolve(user); resolve(user);
} }
else { else {
alert('Invalid Username or Password');
reject(new Error('Inavlid username or Password')); reject(new Error('Inavlid username or Password'));
} }
} else { } else {
alert('Invalid Username or Password');
reject(new Error('Invalid username or Password')); reject(new Error('Invalid username or Password'));
} }
} catch(err) { } catch(err) {
console.error(err); console.error(err);
alert(err);
reject(err); reject(err);
} }
}) })
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment