Browse Source

Fixed bug where param wasn't getting found

pull/1922/head
Fabio Azevedo (CTW) 2 years ago
parent
commit
b8a19775ec
  1. 6
      apps/api/src/app/platform/platform.controller.ts

6
apps/api/src/app/platform/platform.controller.ts

@ -52,7 +52,7 @@ export class PlatformController {
@Put(':id') @Put(':id')
@UseGuards(AuthGuard('jwt')) @UseGuards(AuthGuard('jwt'))
public async updatePlatform( public async updatePlatform(
@Param(':id') id: string, @Param('id') id: string,
@Body() data: UpdatePlatformDto @Body() data: UpdatePlatformDto
) { ) {
if ( if (
@ -87,7 +87,7 @@ export class PlatformController {
@Delete(':id') @Delete(':id')
@UseGuards(AuthGuard('jwt')) @UseGuards(AuthGuard('jwt'))
public async deletePlatform(@Param(':id') id: string) { public async deletePlatform(@Param('id') id: string) {
if ( if (
!hasPermission(this.request.user.permissions, permissions.deletePlatform) !hasPermission(this.request.user.permissions, permissions.deletePlatform)
) { ) {
@ -96,7 +96,7 @@ export class PlatformController {
StatusCodes.FORBIDDEN StatusCodes.FORBIDDEN
); );
} }
console.log('id', id);
const originalPlatform = await this.platformService.getPlatform({ const originalPlatform = await this.platformService.getPlatform({
id id
}); });

Loading…
Cancel
Save