Email sign in (#13)

polished via-email component
used state to track email and password.
explicitly did not put email and password in value of the appropriate input fields because that is not necessary nor do we want to write the clear text password into the dom

Signed-off-by: Philip Molares <philip.molares@udo.edu>
(cherry picked from commit c5f5956b8d8bb02553f85443f8b04acbf0c31f2b)
This commit is contained in:
Philip Molares 2020-05-15 20:38:38 +02:00 committed by Tilman Vatteroth
parent 93ce059577
commit 41f969fda6
No known key found for this signature in database
GPG key ID: DEBDB3F34641B019
7 changed files with 71 additions and 24 deletions

View file

@ -17,5 +17,11 @@ export const postEmailLogin = async (email: string, password: string) => {
email: email,
password: password,
})
});
}).then(response => {
if (response.status !== 200) {
return Promise.reject("Response code not 200");
} else {
return response.json();
}
})
}