Delete message when no more association (#3701)
* Delete message when no more association * remove unused injections * rename methods * fix after review
This commit is contained in:
@ -22,6 +22,15 @@ export class WorkspaceDataSourceService {
|
||||
public async connectToWorkspaceDataSource(
|
||||
workspaceId: string,
|
||||
): Promise<DataSource> {
|
||||
const { dataSource } =
|
||||
await this.connectedToWorkspaceDataSourceAndReturnMetadata(workspaceId);
|
||||
|
||||
return dataSource;
|
||||
}
|
||||
|
||||
public async connectedToWorkspaceDataSourceAndReturnMetadata(
|
||||
workspaceId: string,
|
||||
) {
|
||||
const dataSourceMetadata =
|
||||
await this.dataSourceService.getLastDataSourceMetadataFromWorkspaceIdOrFail(
|
||||
workspaceId,
|
||||
@ -36,7 +45,7 @@ export class WorkspaceDataSourceService {
|
||||
);
|
||||
}
|
||||
|
||||
return dataSource;
|
||||
return { dataSource, dataSourceMetadata };
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user