Fix :编辑按钮保留历史记录
This commit is contained in:
10
main.go
10
main.go
@@ -427,6 +427,16 @@ func handleTask(w http.ResponseWriter, r *http.Request) {
|
||||
Time: now.Add(time.Duration(i-90) * time.Minute),
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mu.RLock()
|
||||
if existing, ok := tasks[task.ID]; ok {
|
||||
task.History = existing.History
|
||||
task.InStock = existing.InStock
|
||||
task.LastCheck = existing.LastCheck
|
||||
task.Status = existing.Status
|
||||
task.Notified = existing.Notified
|
||||
}
|
||||
mu.RUnlock()
|
||||
}
|
||||
|
||||
mu.Lock()
|
||||
|
||||
Reference in New Issue
Block a user