mirror of
https://github.com/Canner/WrenAI.git
synced 2026-09-24 23:29:49 +08:00
fix lint issue (#65)
This commit is contained in:
@@ -6,7 +6,7 @@ import {
|
||||
SampleDatasetData,
|
||||
} from '../types';
|
||||
import { getLogger } from '@server/utils';
|
||||
import { Model, ModelColumn, Project, Relation } from '../repositories';
|
||||
import { Model, ModelColumn, Project } from '../repositories';
|
||||
import {
|
||||
SampleDatasetName,
|
||||
SampleDatasetRelationship,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { DataSourceStrategyFactory } from '../factories/onboardingFactory';
|
||||
import {
|
||||
IModelColumnRepository,
|
||||
IModelRepository,
|
||||
@@ -51,18 +50,6 @@ export class ModelService implements IModelService {
|
||||
return `${sourceTableName}_${existedReferenceNames.length + 1}`;
|
||||
}
|
||||
|
||||
public async saveModels(strategy: DataSourceStrategyFactory, tables: any) {
|
||||
const project = await this.projectService.getCurrentProject();
|
||||
const projectId = project.id;
|
||||
|
||||
// delete existing models and columns
|
||||
await this.resetCurrentProjectModel(projectId);
|
||||
|
||||
// create model and columns
|
||||
|
||||
const { models, columns } = await strategy.saveModels(tables);
|
||||
}
|
||||
|
||||
public async saveRelations(relations: RelationData[]) {
|
||||
const project = await this.projectService.getCurrentProject();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user