Skip to content

Commit 98ee8a4

Browse files
committed
fix(mcp): 修改课程列表取值方式,courseList 改为 courseList.Data
1 parent a30b3f9 commit 98ee8a4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

api/mcp/course.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func handleGetCourse(ctx context.Context, request mcp.CallToolRequest) (*mcp.Cal
118118
// 包装成JSON,JSON数组直接返回时不合法的
119119
resp := map[string]any{
120120
"term": term,
121-
"courses": courseList,
121+
"courses": courseList.Data,
122122
}
123123

124124
return mcp.NewToolResultJSON(resp)

0 commit comments

Comments
 (0)