This commit is contained in:
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user