diff --git a/handler/tool.go b/handler/tool.go index 811170c..fda8380 100644 --- a/handler/tool.go +++ b/handler/tool.go @@ -4,6 +4,7 @@ import ( "StuAcaWorksAI/dao" "StuAcaWorksAI/proto" "StuAcaWorksAI/service" + "StuAcaWorksAI/service/spark" "StuAcaWorksAI/worker" "encoding/json" "fmt" @@ -444,8 +445,12 @@ func GetSparkPPTThemeList(c *gin.Context) { modelParam.Url = model.Url modelParam.System = funcs[0].Info //系统功能 //获取主题列表 - themeList, err := service.SparkPPTThemeList(&modelParam, req) - + themeList, err2 := spark.SparkPPTThemeList(&modelParam, req) + if err2 != nil { + c.JSON(http.StatusOK, gin.H{"error": "get spark ppt theme list error", "code": proto.ParameterError, "message": "failed"}) + return + } + c.JSON(http.StatusOK, gin.H{"code": proto.SuccessCode, "message": "success", "data": themeList}) } else { c.JSON(http.StatusOK, gin.H{"error": "parameter error", "code": proto.ParameterError, "message": "failed"}) return