order
This commit is contained in:
@@ -392,13 +392,12 @@ export class OrderService {
|
||||
}
|
||||
|
||||
async calculateOrder(inputOrder?: Order, orderId?: string) {
|
||||
let order: undefined | Order = undefined
|
||||
if (orderId) {
|
||||
let order: undefined | Order = inputOrder
|
||||
|
||||
if (!order && orderId) {
|
||||
order = await this.findOneOrFail(orderId)
|
||||
}
|
||||
if (order) {
|
||||
order = inputOrder
|
||||
}
|
||||
|
||||
if (!order) {
|
||||
throw new BadRequestException("Order not found")
|
||||
}
|
||||
@@ -446,7 +445,7 @@ export class OrderService {
|
||||
|
||||
orderItem.confirmedAt = new Date()
|
||||
|
||||
await this.em.persistAndFlush(OrderItem)
|
||||
await this.em.persistAndFlush(orderItem)
|
||||
|
||||
return orderItem
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import { AuthGuard } from '../../auth/guards/auth.guard';
|
||||
export class UploaderController {
|
||||
constructor(private readonly uploaderService: UploaderService) {}
|
||||
|
||||
@UseGuards(AuthGuard)
|
||||
// @UseGuards(AuthGuard)
|
||||
@ApiBearerAuth()
|
||||
@ApiOperation({ summary: 'Upload a file (admin)' })
|
||||
@ApiConsumes('multipart/form-data')
|
||||
@@ -22,7 +22,7 @@ export class UploaderController {
|
||||
return this.uploaderService.uploadFile(file);
|
||||
}
|
||||
|
||||
@UseGuards(AuthGuard)
|
||||
// @UseGuards(AuthGuard)
|
||||
@ApiBearerAuth()
|
||||
@ApiOperation({ summary: 'Uploads multiple files' })
|
||||
@ApiConsumes('multipart/form-data')
|
||||
|
||||
Reference in New Issue
Block a user