File tree Expand file tree Collapse file tree 2 files changed +3
-35
lines changed
modules/browser/services/string-business Expand file tree Collapse file tree 2 files changed +3
-35
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,6 @@ export class BiggerThan implements ValidatorConstraintInterface {
13
13
}
14
14
15
15
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 ( ', ' ) } ` ;
17
17
}
18
18
}
Original file line number Diff line number Diff line change @@ -124,42 +124,10 @@ export class StringBusinessService {
124
124
clientMetadata : ClientMetadata ,
125
125
dto : GetKeyInfoDto ,
126
126
) : 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 (
158
128
clientMetadata ,
159
- RECOMMENDATION_NAMES . STRING_TO_JSON ,
160
- { value : result . value , keyName : result . keyName } ,
129
+ dto ,
161
130
) ;
162
- this . logger . log ( 'Succeed to get string value.' ) ;
163
131
164
132
const stream = Readable . from ( result . value ) ;
165
133
return { stream } ;
You can’t perform that action at this time.
0 commit comments