From 0a68878a11c9dd3756a1e11a08ecf9225ba30010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Mur=C3=A7a?= Date: Thu, 29 Sep 2022 18:22:02 -0300 Subject: [PATCH] Update mocked user to authenticate --- src/context/auth.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/context/auth.js b/src/context/auth.js index fc3f4b2..655b8d1 100644 --- a/src/context/auth.js +++ b/src/context/auth.js @@ -22,8 +22,7 @@ function AuthProvider(props) { const register = data => { setState({ ...state, status: 'pending' }); - let shouldFail = - data.email !== 'leo@gmail.com' && data.password !== '#leo1234'; + let shouldFail = false; return registerUser(data, shouldFail).then(data => { if (shouldFail) { @@ -36,7 +35,7 @@ function AuthProvider(props) { const login = (email, password) => { setState({ ...state, status: 'pending' }); - let shouldFail = email !== 'leo@gmail.com' && password !== '#leo1234'; + let shouldFail = email !== 'teste@teste.com' || password !== '#teste1234'; return getUser(shouldFail).then(data => { if (shouldFail) {