Skip to content

Commit e5f86f4

Browse files
committed
#RI-3650 - 431 status error on get big key
1 parent 546b577 commit e5f86f4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

redisinsight/api/src/modules/browser/controllers/keys/keys.controller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class KeysController extends BaseController {
4040
super();
4141
}
4242

43-
@Get('')
43+
@Post('')
4444
@ApiOperation({ description: 'Get keys by cursor position' })
4545
@ApiRedisParams()
4646
@ApiOkResponse({
@@ -50,7 +50,7 @@ export class KeysController extends BaseController {
5050
@ApiQueryRedisStringEncoding()
5151
async getKeys(
5252
@Param('dbInstance') dbInstance: string,
53-
@Query() getKeysDto: GetKeysDto,
53+
@Body() getKeysDto: GetKeysDto,
5454
): Promise<GetKeysWithDetailsResponse[]> {
5555
return this.keysBusinessService.getKeys(
5656
{

redisinsight/api/test/api/keys/GET-instance-id-keys.test.ts renamed to redisinsight/api/test/api/keys/POST-instance-id-keys.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const { server, request, constants, rte } = deps;
1515

1616
// endpoint to test
1717
const endpoint = (instanceId = constants.TEST_INSTANCE_ID) =>
18-
request(server).get(`/instance/${instanceId}/keys`);
18+
request(server).post(`/instance/${instanceId}/keys`);
1919

2020
const responseSchema = Joi.array().items(Joi.object().keys({
2121
total: Joi.number().integer().required(),
@@ -56,7 +56,7 @@ const isKeyInResponse = (body, keyName) => _.find(
5656
),
5757
)
5858

59-
describe('GET /instance/:instanceId/keys', () => {
59+
describe('POST /instance/:instanceId/keys', () => {
6060
// todo: add query validation
6161
xdescribe('Validation', () => {});
6262

0 commit comments

Comments
 (0)