-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
After a user signs in src/APIFunctions/Auth.js:79. Their last login date is updated in a second API call from the browser. Updating the user's last login date should happen within the /login API.
game plan
- remove the
updateLastLoginDatefunction in src/APIFunctions/User.js:149 - change
/loginin api/main_endpoints/routes/Auth.js:129 to not use else statements, instead returning early like
if (!user) {
return res
.status(UNAUTHORIZED)
.send({
message: 'Username or password does not match our records.'
});
}
// down here you can assume the user exists and continue with the code in `else` outside of a nested block- set the last login date in api/main_endpoints/routes/Auth.js:179
- do we have unit tests for the /login API, if so, can we add a check to make sure the user's last login date was updated?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels