Open alcarazolabs opened 3 years ago
Hi @probelalkhan bro I tested the app and works the login with my own Rest Api, the app then redirect to the dashboard but keep loading the loading picture.. and there is not info.. But the another bug is that if we login with a wrong user or wrong credentials the app got crash! because responses.User.getAccess_token()' on a null object reference.. with a null response the app got crash! My Api only is sending a json response {message: "wrong credentials" } Test the App again bro you have a bug... Please update it.. Thanks so much.
@probelalkhan Hi bro! I updated my Api Rest. Before I was sendig a server message: if(!user) return res.send({message: "wrong email"}) now I updated it responding wiht a 401 status code
if(!user) return res.status(401).send('wrong email')
I did it using node.js and express.. Ok bro I update and the App works but how we can get the server message and show it instead of do it: requireView().snackbar("You've entered incorrect email or password") ? I want to show the server message instead of the snackbar message.. ¿Can you update it? thanks so much.
Hello bro! I just update the URL of the datasource:
This my AuthApi:
Therefore to test this endpoit it should be: http://192.168.0.4:5000/api/user/login ok this works using Posman and this is my output:
I updated the class User according to my Output:
But when I run the project and test it.. always with a correct credentials or wrong credentials it always throw this error:
There is a but because of it: User.getAccess_token()' on a null object reference this code is in (LoginFragment.kt:34) Here is a picture: https://imgur.com/a/kIPtBnQ Please bro if you have any idea about this issue I will apreciate it to fix this problem
Thanks for the videos.