issues
search
se701team3
/
Forgettable
University of Auckland SOFTENG 701 Team 3 Assignment 1
MIT License
12
stars
44
forks
source link
[#233] Goal setting for users
#341
Closed
wjun856
closed
2 years ago
wjun856
commented
2 years ago
Add the new goal data model
Add goal to the person schema
Route GET /goal
If there is a goal, return the goal object and the progress
If there is no goal, return no content
Before it sends a goal, it should check if the end date has surpassed
If the date is surpassed and it is a recurring goal, update the current start/end dates accordingly
If the date is surpassed and it isn't a recurring goal, remove the goal and return no content
Route POST /goal
Creates a new goal
The body will contain: { encounters: number, duration: string, recurring: boolean }
Should use the duration string and the current date to compute the start/end date of the goal
Route PUT /goal
Updates the current goal
Same body contents as POST /goal
Route DELETE /goal
Deletes the current goal