Browse Source

fix: kanban update api handler correction

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5444/head
Pranav C 1 year 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 {
Body,
Controller,
Get, HttpCode,
Get,
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,
@ -44,12 +44,13 @@ export class KanbansController {
@Patch('/api/v1/db/meta/kanbans/:kanbanViewId')
@Acl('kanbanViewUpdate')
async kanbanViewUpdate(req, res) {
res.json(
await this.kanbansService.kanbanViewUpdate({
kanbanViewId: req.params.kanbanViewId,
kanban: req.body,
}),
);
async kanbanViewUpdate(
@Param('kanbanViewId') kanbanViewId: string,
@Body() body,
) {
return await this.kanbansService.kanbanViewUpdate({
kanbanViewId,
kanban: body,
});
}
}

Loading…
Cancel
Save