From f7edb38b176db381de45ee8dc6f1627273819159 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 13 Apr 2023 23:51:47 +0530 Subject: [PATCH] fix: grid update api handler correction Signed-off-by: Pranav C --- .../src/modules/grids/grids.controller.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/nocodb-nest/src/modules/grids/grids.controller.ts b/packages/nocodb-nest/src/modules/grids/grids.controller.ts index 1cfa04c1de..00bfc46fa2 100644 --- a/packages/nocodb-nest/src/modules/grids/grids.controller.ts +++ b/packages/nocodb-nest/src/modules/grids/grids.controller.ts @@ -1,14 +1,15 @@ import { Body, - Controller, HttpCode, + Controller, + HttpCode, Param, Patch, Post, UseGuards, -} from '@nestjs/common' +} from '@nestjs/common'; import { ViewCreateReqType } from 'nocodb-sdk'; import { AuthGuard } from '@nestjs/passport'; -import { GlobalGuard } from '../../guards/global/global.guard' +import { GlobalGuard } from '../../guards/global/global.guard'; import { Acl, ExtractProjectIdMiddleware, @@ -37,10 +38,10 @@ export class GridsController { return view; } @Patch('/api/v1/db/meta/grids/:viewId') - async gridViewUpdate(req, res) { + async gridViewUpdate(@Param('viewId') viewId: string, @Body() body) { return await this.gridsService.gridViewUpdate({ - viewId: req.params.viewId, - grid: req.body, + viewId, + grid: body, }); } }