fix: agent id type error

This commit is contained in:
engigu
2026-03-03 20:17:41 +08:00
parent 204f379ec8
commit 146177a8a7
3 changed files with 92 additions and 78 deletions
+2 -2
View File
@@ -373,7 +373,7 @@ func cmdTasks() {
Code int `json:"code"`
Msg string `json:"msg"`
Data struct {
AgentID uint `json:"agent_id"`
AgentID string `json:"agent_id"`
Tasks []AgentTask `json:"tasks"`
} `json:"data"`
}
@@ -395,7 +395,7 @@ func cmdTasks() {
fmt.Printf("共 %d 个任务:\n\n", len(tasks))
for i, task := range tasks {
fmt.Printf("[%d] ID: %d\n", i+1, task.ID)
fmt.Printf("[%d] ID: %s\n", i+1, task.ID)
fmt.Printf(" 名称: %s\n", task.Name)
fmt.Printf(" Cron: %s\n", task.Schedule)
fmt.Printf(" 命令: %s\n", task.Command)