mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-04-29 11:07:29 +08:00
refactor: stabilize runtime and unify config
This commit is contained in:
@@ -37,13 +37,11 @@ func (t *CronTool) Execute(ctx context.Context, args map[string]interface{}) (st
|
||||
if t.cs == nil {
|
||||
return "Error: cron service not available", nil
|
||||
}
|
||||
action, _ := args["action"].(string)
|
||||
action = strings.ToLower(strings.TrimSpace(action))
|
||||
action := strings.ToLower(MapStringArg(args, "action"))
|
||||
if action == "" {
|
||||
action = "list"
|
||||
}
|
||||
id, _ := args["id"].(string)
|
||||
id = strings.TrimSpace(id)
|
||||
id := MapStringArg(args, "id")
|
||||
|
||||
switch action {
|
||||
case "list":
|
||||
|
||||
Reference in New Issue
Block a user