This commit is contained in:
2026-01-31 15:26:44 +03:30
parent 20ea6a82dd
commit 23ace8ce69
3 changed files with 5 additions and 4 deletions
@@ -31,7 +31,7 @@ export class FieldService {
if (entityType == EntityType.product) {
entity = await this.productService.findOneOrFail(entityId)
} else if (entityType == EntityType.print) {
entity = await this.printService.findOneOrFail(entityId)
entity = await this.printService.finOrFail(entityId)
}
if (!entity) {
+3 -2
View File
@@ -221,7 +221,7 @@ export class OrderService {
}
async findPrints(dto: FindOrdersDto) {
const orders = await this.orderRepository.findAllPaginated({...dto,statuses:[]})
const orders = await this.orderRepository.findAllPaginated({ ...dto, statuses: [] })
return orders
}
@@ -325,7 +325,8 @@ export class OrderService {
}
async createInvoice(orderId: string) {
await this.updateStatus(orderId, OrderStatusEnum.INVOICED)
const order = await this.updateStatus(orderId, OrderStatusEnum.INVOICED)
return order
}
async getOrderAsUser(userId: string, orderId: string) {
@@ -32,7 +32,7 @@ export class PrintController {
@ApiOperation({ summary: 'Find one section' })
@UseGuards(AdminAuthGuard)
findOne(@Param('id') id: string) {
return this.sectionService.findOneOrFail(+id);
return this.sectionService.finOrFail(+id);
}
@Patch('section/:id')