Browse Source

fix: kanban update api handler correction

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5444/head
Pranav C 2 years ago
parent
commit
b29b229e47
  1. 23
      packages/nocodb-nest/src/modules/kanbans/kanbans.controller.ts

23
packages/nocodb-nest/src/modules/kanbans/kanbans.controller.ts

@ -1,15 +1,15 @@
import { import {
Body, Body,
Controller, Controller,
Get, HttpCode, Get,
HttpCode,
Param, Param,
Patch, Patch,
Post, Post,
UseGuards, UseGuards,
} from '@nestjs/common' } from '@nestjs/common';
import { ViewCreateReqType } from 'nocodb-sdk'; 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 { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
@ -44,12 +44,13 @@ export class KanbansController {
@Patch('/api/v1/db/meta/kanbans/:kanbanViewId') @Patch('/api/v1/db/meta/kanbans/:kanbanViewId')
@Acl('kanbanViewUpdate') @Acl('kanbanViewUpdate')
async kanbanViewUpdate(req, res) { async kanbanViewUpdate(
res.json( @Param('kanbanViewId') kanbanViewId: string,
await this.kanbansService.kanbanViewUpdate({ @Body() body,
kanbanViewId: req.params.kanbanViewId, ) {
kanban: req.body, return await this.kanbansService.kanbanViewUpdate({
}), kanbanViewId,
); kanban: body,
});
} }
} }

Loading…
Cancel
Save