Browse Source

fix: grid update api handler correction

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5444/head
Pranav C 1 year ago
parent
commit
f7edb38b17
  1. 13
      packages/nocodb-nest/src/modules/grids/grids.controller.ts

13
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,
});
}
}

Loading…
Cancel
Save