MCPcopy Index your code
hub / github.com/OpenListTeam/OpenList / UpdateTaskDataFunc

Function UpdateTaskDataFunc

internal/db/tasks.go:39–50  ·  view source on GitHub ↗
(type_s string, enabled bool)

Source from the content-addressed store, hash-verified

37}
38
39func UpdateTaskDataFunc(type_s string, enabled bool) func([]byte) error {
40 if !enabled {
41 return nil
42 }
43 return func(data []byte) error {
44 s := string(data)
45 if s == "null" || s == "" {
46 s = "[]"
47 }
48 return UpdateTaskData(&model.TaskItem{Key: type_s, PersistData: s})
49 }
50}

Callers 1

InitTaskManagerFunction · 0.92

Calls 1

UpdateTaskDataFunction · 0.85

Tested by

no test coverage detected