xxx
This commit is contained in:
@@ -1,4 +1,14 @@
|
||||
import { Controller, Delete, Get, Param, Req, UseGuards } from '@nestjs/common';
|
||||
import {
|
||||
Body,
|
||||
Controller,
|
||||
Delete,
|
||||
Get,
|
||||
Param,
|
||||
Post,
|
||||
Put,
|
||||
Req,
|
||||
UseGuards,
|
||||
} from '@nestjs/common';
|
||||
import { AuthGuard } from 'src/core/guards/auth.guard';
|
||||
import { CylinderService } from './cylinder.service';
|
||||
import { AuthenticatedRequest } from 'src/model/interface/authenticated-request.interface';
|
||||
@@ -15,7 +25,23 @@ export class CylinderController {
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
deleteKey(@Req() req: AuthenticatedRequest, @Param() id: string) {
|
||||
return this.service.deleteKey(req.user, id);
|
||||
deleteKey(@Req() req: AuthenticatedRequest, @Param('id') id: string) {
|
||||
return this.service.deleteCylinder(req.user, id);
|
||||
}
|
||||
|
||||
@Put()
|
||||
updateCylinder(
|
||||
@Req() req: AuthenticatedRequest,
|
||||
@Body() b: Partial<Cylinder>,
|
||||
) {
|
||||
return this.service.updateCylinder(req.user, b);
|
||||
}
|
||||
|
||||
@Post()
|
||||
createCylinder(
|
||||
@Req() req: AuthenticatedRequest,
|
||||
@Body() b: Partial<Cylinder>,
|
||||
) {
|
||||
return this.service.createCylinder(req.user, b);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user