We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd0d6eb commit c278db3Copy full SHA for c278db3
1 file changed
src/script.js
@@ -24,10 +24,13 @@ addEventListener("submit", (event) => {
24
25
console.log(`email submitted: ${email}`);
26
console.log(`password submitted: ${password}`);
27
- /*
28
- TODO:
29
- 1. Check if the email and password are valid (using the usersTable)
30
- 2. If they are, call renderSuccess()
31
- 3. If they are not, call renderError()
32
- */
+
+ for (const element of usersTable) {
+ if (email === element.username && password === element.password) {
+ renderSuccess();
+ break;
+ }
33
+ else
34
+ renderError();
35
36
});
0 commit comments