aboutsummaryrefslogtreecommitdiffstats
path: root/internal/chore
diff options
context:
space:
mode:
Diffstat (limited to 'internal/chore')
-rw-r--r--internal/chore/handler.go9
-rw-r--r--internal/chore/model/model.go10
2 files changed, 8 insertions, 11 deletions
diff --git a/internal/chore/handler.go b/internal/chore/handler.go
index 5ec8cdd..0067940 100644
--- a/internal/chore/handler.go
+++ b/internal/chore/handler.go
@@ -683,12 +683,7 @@ func (h *Handler) skipChore(c *gin.Context) {
})
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{
"res": chore,
})
@@ -861,7 +856,7 @@ func (h *Handler) completeChore(c *gin.Context) {
return
}
go func() {
- h.notifier.SendChoreCompletion(c, chore, []*uModel.User{currentUser})
+ h.notifier.SendChoreCompletion(c, chore, currentUser)
h.nPlanner.GenerateNotifications(c, updatedChore)
}()
c.JSON(200, gin.H{
diff --git a/internal/chore/model/model.go b/internal/chore/model/model.go
index 3fb7a92..c9cf28c 100644
--- a/internal/chore/model/model.go
+++ b/internal/chore/model/model.go
@@ -51,10 +51,12 @@ type FrequencyMetadata struct {
}
type NotificationMetadata struct {
- DueDate bool `json:"dueDate,omitempty"`
- Completion bool `json:"completion,omitempty"`
- Nagging bool `json:"nagging,omitempty"`
- PreDue bool `json:"predue,omitempty"`
+ DueDate bool `json:"dueDate,omitempty"`
+ Completion bool `json:"completion,omitempty"`
+ Nagging bool `json:"nagging,omitempty"`
+ PreDue bool `json:"predue,omitempty"`
+ CircleGroup bool `json:"circleGroup,omitempty"`
+ CircleGroupID *int64 `json:"circleGroupID,omitempty"`
}
type Tag struct {