Skip to content

Commit 9ac438e

Browse files
#RI-2509-refactor
1 parent 4d3a309 commit 9ac438e

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

redisinsight/api/src/modules/workbench/dto/create-command-execution.dto.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ export class CreateCommandExecutionDto {
4545

4646
@ApiPropertyOptional({
4747
description: 'Workbench group mode',
48-
default: false,
48+
default: ResultsMode.Default,
49+
enum: ResultsMode,
4950
})
5051
@IsOptional()
5152
@IsEnum(ResultsMode, {

redisinsight/api/src/modules/workbench/models/command-execution.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,6 @@ export class CommandExecution {
6666
@Expose()
6767
resultsMode?: ResultsMode = ResultsMode.Default;
6868

69-
@ApiPropertyOptional({
70-
description: 'Group mode',
71-
type: Boolean,
72-
})
73-
@Expose()
74-
isGroupMode?: boolean;
75-
7669
@ApiPropertyOptional({
7770
description: 'Workbench executions summary',
7871
type: () => ResultsSummary,
@@ -89,8 +82,8 @@ export class CommandExecution {
8982
result: CommandExecutionResult[];
9083

9184
@ApiPropertyOptional({
92-
type: Boolean,
9385
description: 'Result did not stored in db',
86+
type: Boolean,
9487
})
9588
@Expose()
9689
isNotStored?: boolean;

redisinsight/api/src/modules/workbench/providers/command-execution.provider.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export class CommandExecutionProvider {
4545
},
4646
]);
4747
}
48+
4849
return this.encryptEntity(entity);
4950
}));
5051

@@ -64,12 +65,14 @@ export class CommandExecutionProvider {
6465
},
6566
)),
6667
);
68+
6769
// cleanup history and ignore error if any
6870
try {
6971
await this.cleanupDatabaseHistory(entities[0].databaseId);
7072
} catch (e) {
7173
this.logger.error('Error when trying to cleanup history after insert', e);
7274
}
75+
7376
return response;
7477
}
7578

0 commit comments

Comments
 (0)