add support for changing task item.
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-01-17 19:48:05 +01:00
parent eeba5bc9c8
commit 197fe227a4
4 changed files with 25 additions and 2 deletions
+4
View File
@@ -20,6 +20,9 @@ type Task struct {
}
func (task *Task) Update(update TaskUpdate) {
if update.ItemID != nil {
task.ItemID = *update.ItemID
}
if update.ItemAmount != nil {
task.ItemAmount = *update.ItemAmount
}
@@ -42,6 +45,7 @@ func (task *Task) Update(update TaskUpdate) {
}
type TaskUpdate struct {
ItemID *string `json:"itemId"`
ItemAmount *int `json:"itemAmount"`
Name *string `json:"name"`
Description *string `json:"description"`