Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add lastAccessed key to track user login #364

Merged
merged 10 commits into from
Sep 29, 2020
Merged

Conversation

karrui
Copy link
Contributor

@karrui karrui commented Sep 22, 2020

Problem

This PR adds a new lastAccessed key in the User collection which gets updated every time the user's document is retrieved when the user logs into the application.

This PR also adds a new updatedAt key which is only updated when contact is updated for now. The timestamp plugin is not used as updating the lastAccessed key will also inadvertently update the updatedAt key, which is not the behaviour we want.

Closes #345

Solution

Features:

  • add lastAccessed and updatedAt keys to User model which gets updated when user logins and when new user is created/user updates their contact respectively.

@karrui karrui requested review from mantariksh and tshuli September 22, 2020 13:57
@karrui karrui changed the title Feat/track user login feat: add lastAccessed key to track user login Sep 22, 2020
@karrui karrui merged commit 6d28078 into develop Sep 29, 2020
@karrui karrui deleted the feat/track-user-login branch September 29, 2020 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Put user last login key in db
2 participants