...
|
...
|
@@ -29,6 +29,11 @@ func (logic *ByteTableDataLogic) Sync(pusherStr string) error { |
|
|
return err
|
|
|
}
|
|
|
conn := logic.svcCtx.DefaultDBConn()
|
|
|
//验证是否有使用数据源
|
|
|
used, err := logic.svcCtx.ChartSettingRepository.CheckUseDataSource(logic.ctx, conn, pusher.ObjectId)
|
|
|
if err != nil || !used {
|
|
|
return err
|
|
|
}
|
|
|
accessToken, _ := types.TableAccessToken{CompanyId: pusher.CompanyId}.GenerateToken()
|
|
|
tableDataPreview, err := logic.svcCtx.ByteMetadataService.TableDataPreview(logic.ctx, &bytelib.TableDataPreviewRequest{
|
|
|
Token: accessToken,
|
...
|
...
|
|