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

[TASK-10] Implement Daily Records Table and API Middleware #32

Closed
abedmohammed opened this issue Nov 11, 2024 · 0 comments · Fixed by #49
Closed

[TASK-10] Implement Daily Records Table and API Middleware #32

abedmohammed opened this issue Nov 11, 2024 · 0 comments · Fixed by #49

Comments

@abedmohammed
Copy link
Collaborator

[TASK-10] Implement Daily Records Table and API Middleware

Goal:
Create the daily_records table and implement a middleware to ensure daily records are created as needed.

Requirements:

  1. Create Daily Records Table:
image

  1. Daily Records API Middleware:
    • Implement middleware to check for an existing daily record for the current date.
    • Automatically create a new daily_record entry if it does not already exist when a user accesses an endpoint related to moods or attempts to create one.
    • middleware should run before any endpoint regarding journals, moods, or activities
      • can be put after authentication middleware

Expected Outcome:
A daily_records table with middleware that ensures a daily record is always present for the current date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants