Co-authored-by: hello@lv <2256334253@qq.com> Co-authored-by: wjh <wwwjh0710@163.com> Co-authored-by: sealday <sealday@gmail.com> Reviewed-on: daoyoucloud/tachybase#719
16 lines
384 B
TypeScript
16 lines
384 B
TypeScript
import { DataSourceOptions, DataSource } from '@tachybase/client';
|
|
|
|
export class ThirdDataSource extends DataSource {
|
|
async getDataSource() {
|
|
const service = await this.app.apiClient.request<{
|
|
data: DataSourceOptions;
|
|
}>({
|
|
url: `dataSources:get/${this.key}`,
|
|
params: {
|
|
appends: ['collections'],
|
|
},
|
|
});
|
|
return service.data.data;
|
|
}
|
|
}
|