Skip to content

Commit 7836a03

Browse files
irinaAbramova-devirinaP-local
authored andcommitted
#RI-4815 fix download string
1 parent fa44880 commit 7836a03

File tree

2 files changed

+3
-35
lines changed

2 files changed

+3
-35
lines changed

redisinsight/api/src/common/validators/bigger-than.validator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ export class BiggerThan implements ValidatorConstraintInterface {
1313
}
1414

1515
defaultMessage(args: ValidationArguments) {
16-
return `${args.property} must be a greater than ${args.constraints.join(', ')}`;
16+
return `${args.property} must be bigger than ${args.constraints.join(', ')}`;
1717
}
1818
}

redisinsight/api/src/modules/browser/services/string-business/string-business.service.ts

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -124,42 +124,10 @@ export class StringBusinessService {
124124
clientMetadata: ClientMetadata,
125125
dto: GetKeyInfoDto,
126126
): Promise<{ stream: Readable }> {
127-
// const result = await this.getStringValue(
128-
// clientMetadata,
129-
// dto,
130-
// );
131-
132-
const { keyName } = dto;
133-
let result: GetStringValueResponse;
134-
135-
try {
136-
const value = await this.browserTool.execCommand(
137-
clientMetadata,
138-
BrowserToolStringCommands.Get,
139-
[keyName],
140-
);
141-
result = { value, keyName };
142-
} catch (error) {
143-
this.logger.error('Failed to get string value.', error);
144-
if (error.message.includes(RedisErrorCodes.WrongType)) {
145-
throw new BadRequestException(error.message);
146-
}
147-
catchAclError(error);
148-
}
149-
150-
if (result.value === null) {
151-
this.logger.error(
152-
`Failed to get string value. Not Found key: ${keyName}.`,
153-
);
154-
throw new NotFoundException();
155-
}
156-
157-
this.recommendationService.check(
127+
const result = await this.getStringValue(
158128
clientMetadata,
159-
RECOMMENDATION_NAMES.STRING_TO_JSON,
160-
{ value: result.value, keyName: result.keyName },
129+
dto,
161130
);
162-
this.logger.log('Succeed to get string value.');
163131

164132
const stream = Readable.from(result.value);
165133
return { stream };

0 commit comments

Comments
 (0)