chore: Fix completion window check in completeChore function
Add Resource handler
This commit is contained in:
parent
4c1b402137
commit
86c90a34ee
2 changed files with 1 additions and 15 deletions
|
@ -998,7 +998,7 @@ func (h *Handler) completeChore(c *gin.Context) {
|
|||
}
|
||||
// confirm that the chore in completion window:
|
||||
if chore.CompletionWindow != nil {
|
||||
if completedDate.After(chore.NextDueDate.Add(time.Hour * time.Duration(*chore.CompletionWindow))) {
|
||||
if completedDate.Before(chore.NextDueDate.Add(time.Hour * time.Duration(*chore.CompletionWindow))) {
|
||||
c.JSON(400, gin.H{
|
||||
"error": "Chore is out of completion window",
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue