Skip to content

Update user's last login date within /login endpoint #1775

@adarshm11

Description

@adarshm11

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

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions