mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-09 18:53:43 +08:00
feat: 头条,微博热搜等函数 API 实现
This commit is contained in:
@@ -73,6 +73,9 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
config.Path = configFile
|
||||
if debug {
|
||||
_ = core.SaveConfig(config)
|
||||
}
|
||||
return config
|
||||
}),
|
||||
// 创建应用服务
|
||||
@@ -114,13 +117,13 @@ func main() {
|
||||
|
||||
// 创建函数
|
||||
fx.Provide(func(config *types.AppConfig) (function.FuncZaoBao, error) {
|
||||
return function.NewZaoBao(config.FunApiToken), nil
|
||||
return function.NewZaoBao(config.Func), nil
|
||||
}),
|
||||
fx.Provide(func(config *types.AppConfig) (function.FuncWeiboHot, error) {
|
||||
return function.NewWeiboHot(config.FunApiToken), nil
|
||||
return function.NewWeiboHot(config.Func), nil
|
||||
}),
|
||||
fx.Provide(func(config *types.AppConfig) (function.FuncHeadlines, error) {
|
||||
return function.NewHeadLines(config.FunApiToken), nil
|
||||
return function.NewHeadLines(config.Func), nil
|
||||
}),
|
||||
|
||||
// 创建控制器
|
||||
|
||||
Reference in New Issue
Block a user