hard delete order
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Controller, Get, Post, Param, UseGuards, Patch, Query, Body } from '@nestjs/common';
|
||||
import { Controller, Get, Post, Param, UseGuards, Patch, Query, Body, Delete } from '@nestjs/common';
|
||||
import { ApiTags, ApiOperation, ApiBearerAuth, ApiParam, ApiHeader, ApiBody, ApiQuery } from '@nestjs/swagger';
|
||||
import { OrderService } from '../providers/order.service';
|
||||
import { AuthGuard } from '../../auth/guards/auth.guard';
|
||||
@@ -55,6 +55,13 @@ export class OrderController {
|
||||
return this.orderService.createOrdeAsAdmin(adminId, body);
|
||||
}
|
||||
|
||||
@Delete('admin/orders/:orderId')
|
||||
@UseGuards(AuthGuard)
|
||||
@ApiOperation({ summary: 'Hard Delete Order ' })
|
||||
hardDelete(@Param('orderId') orderId: string) {
|
||||
return this.orderService.hardDeleteOrder(orderId);
|
||||
}
|
||||
|
||||
@Post('admin/orders/:orderId/create-invoice')
|
||||
@UseGuards(AuthGuard)
|
||||
@ApiOperation({ summary: 'Create invoice for new order' })
|
||||
@@ -68,6 +75,8 @@ export class OrderController {
|
||||
assignDesigner(@Param('orderId') orderId: string, @Body() body: AssignDesignerDto) {
|
||||
return this.orderService.asignDesigner(orderId, body.designerId);
|
||||
}
|
||||
|
||||
|
||||
// @UseGuards(AdminAuthGuard)
|
||||
// @Permissions(Permission.MANAGE_ORDERS)
|
||||
// @Get('admin/orders')
|
||||
|
||||
Reference in New Issue
Block a user