fake-api-jwt-json-server
fake-api-jwt-json-server copied to clipboard
hi I found why I get wrong email or password error
hi amazing project , helped me a lot and works easily I got response 401 wrong email or password it was because syntax mistake at line 30 of server.js
// Check if the user exists in database function isAuthenticated({ email, password }) { ------>>>> // return userdb.users.findIndex(user => user.email === email && user.password === password) !== -1 <<<<------- return userdb.users.findIndex(user => (user.email === email && user.password === password) !== -1) }
just brackets
Yes, work now for new users.
Thank you AhmadShallal, it helped save a lot of time for the beginners. I hope the git owner will make the updates