This commit is contained in:
laodaming 2023-11-09 17:15:51 +08:00
parent 286616c13a
commit 5c1f33a8a8

View File

@ -1,13 +1,9 @@
package logic
import (
"fmt"
"context"
"fusenapi/utils/auth"
"fusenapi/utils/basic"
"fusenapi/utils/feishu"
"log"
"context"
"fusenapi/server/feishu-sync/internal/svc"
"fusenapi/server/feishu-sync/internal/types"
@ -34,16 +30,6 @@ func NewSyncFeiShuGroupsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *
// }
func (l *SyncFeiShuGroupsLogic) SyncFeiShuGroups(req *types.Request, userinfo *auth.UserInfo) (resp *basic.Response) {
feishuApi := &feishu.FeiShuApi{
AppId: l.svcCtx.Config.FeiShu.AppId,
AppSecret: l.svcCtx.Config.FeiShu.AppSecret,
ApiHost: l.svcCtx.Config.FeiShu.ApiHost,
}
token, err := feishuApi.GetTenantAccessToken()
if err != nil {
log.Fatalln(err)
}
fmt.Println("token 信息:", token)
return resp.SetStatus(basic.CodeOK)
}