aboutsummaryrefslogtreecommitdiffstats
path: root/internal/chore
diff options
context:
space:
mode:
authorLibravatar Mo Tarbin <mhed.t91@gmail.com>2024-07-17 01:11:36 -0400
committerLibravatar Mo Tarbin <mhed.t91@gmail.com>2024-07-17 01:11:36 -0400
commit7a5eacdaf31b228ab07d5c8422d179d210e57825 (patch)
tree21806783d2ce48536ae5505e0d5b147514031ef5 /internal/chore
parent83a9abc9d683cd8be848d8e49020bf1f02f55319 (diff)
parent861a1666e48a91d43db6d1fd272dac832013f5b7 (diff)
downloaddonetick-7a5eacdaf31b228ab07d5c8422d179d210e57825.tar.gz
donetick-7a5eacdaf31b228ab07d5c8422d179d210e57825.tar.bz2
donetick-7a5eacdaf31b228ab07d5c8422d179d210e57825.zip
Merge branch 'dev'
Diffstat (limited to '')
-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 {