Remove unnecessary code in skipChore and completeChore functions
This commit is contained in:
parent
c7b29fa195
commit
861a1666e4
|
@ -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{
|
||||||
|
|
Loading…
Reference in New Issue