Remove unnecessary code in skipChore and completeChore functions

This commit is contained in:
Mo Tarbin 2024-07-17 01:11:20 -04:00
parent c7b29fa195
commit 861a1666e4
1 changed files with 2 additions and 7 deletions

View File

@ -683,12 +683,7 @@ func (h *Handler) skipChore(c *gin.Context) {
}) })
return return
} }
if err := h.choreRepo.UpsertChore(c, chore); err != nil {
c.JSON(500, gin.H{
"error": "Error skipping chore",
})
return
}
c.JSON(200, gin.H{ c.JSON(200, gin.H{
"res": chore, "res": chore,
}) })
@ -861,7 +856,7 @@ func (h *Handler) completeChore(c *gin.Context) {
return return
} }
go func() { go func() {
h.notifier.SendChoreCompletion(c, chore, []*uModel.User{currentUser}) h.notifier.SendChoreCompletion(c, chore, currentUser)
h.nPlanner.GenerateNotifications(c, updatedChore) h.nPlanner.GenerateNotifications(c, updatedChore)
}() }()
c.JSON(200, gin.H{ c.JSON(200, gin.H{