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

[#234] Encounter Time Modified Pruning Settings - Backend #343

Merged

Conversation

seanhogunkim
Copy link
Collaborator

@seanhogunkim seanhogunkim commented Mar 31, 2022

Completed backend for pruning

  • Set 31536000s (1 year) TTL for Encounters from time_updated
  • Added API Endpoint DELETE /api/encounters/prune/:pruneDate
    • Deletes all user Encounters whose time_updated field precedes pruneDate
  • Added test case for prune endpoint

Note - Users must manually prune. Frontend implementation would require users to submit a date which they would like all Encounters that haven't been updated since before that date to be pruned

@seanhogunkim seanhogunkim requested review from jmor528 and mdar365 March 31, 2022 04:38
Copy link
Contributor

@MazenDar MazenDar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I really like the commenting as well! Just a minor comment

Copy link
Collaborator

@jmor528 jmor528 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@seanhogunkim seanhogunkim merged commit d0207d5 into se701team3:main-a2 Apr 2, 2022
@seanhogunkim seanhogunkim changed the title [#234] Auto Prune Settings [#234] Encounter Pruning Settings - Backend Apr 3, 2022
@seanhogunkim seanhogunkim changed the title [#234] Encounter Pruning Settings - Backend [#234] Encounter Time Modified Pruning Settings - Backend Apr 3, 2022
abis555 pushed a commit to abis555/Forgettable that referenced this pull request Apr 5, 2022
* Added TTL for encounters of 1 year

* Pruning endpoint created.
Takes input of date which we want to prune before
TODO testing.

* Added test to check that encounters before prune date are deleted

* Fixed prune test to properly call api
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.

4 participants