mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-20 23:49:09 +00:00
FEAT: Connection test creating connection
- If any error occurs, connection is deleted - If operation_result is false, connection is deleted
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty, ApiPropertyOptional, OmitType } from '@nestjs/swagger';
|
||||
import { IsString, IsObject, IsOptional } from 'class-validator';
|
||||
import { IsString, IsOptional } from 'class-validator';
|
||||
import { DatabaseConnectionPropertiesDto } from 'src/modules/connection/dtos/connection';
|
||||
import { CreateConnectionDto } from 'src/modules/connection/dtos/create-connection';
|
||||
export class ColumnDto {
|
||||
@@ -44,11 +44,13 @@ export class ConnectionTestCredentialsReq extends OmitType(
|
||||
['properties'],
|
||||
) {
|
||||
@ApiProperty()
|
||||
@IsString()
|
||||
plugin: string;
|
||||
|
||||
@ApiProperty()
|
||||
@IsObject()
|
||||
properties: DatabaseConnectionPropertiesDto;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
connection_id?: string;
|
||||
}
|
||||
|
||||
export class ConnectionTestCredentialsRes {
|
||||
@@ -116,5 +118,5 @@ export class GetTableMetadataReq {
|
||||
|
||||
export class GetTableMetadataRes {
|
||||
@ApiProperty({ type: [TableMetadataDto] })
|
||||
table_metadata: TableMetadataDto[];
|
||||
tables_metadata: TableMetadataDto[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user