Fix de gestion de orders
Proceso de cancelacion verificado
This commit is contained in:
@@ -240,7 +240,7 @@ export class OrderRepository {
|
||||
)
|
||||
RETURNING id;
|
||||
`
|
||||
const vOrderHistory = [args.id, currentOrder.status, args.new_status, args.reason]
|
||||
const vOrderHistory = [orderId, currentOrder.status, args.new_status, args.reason]
|
||||
const newOrderHistoryResult = await this.getFirst(
|
||||
client.query<{ id: number }>(iOrderHistory, vOrderHistory)
|
||||
)
|
||||
@@ -331,7 +331,7 @@ export class OrderRepository {
|
||||
)
|
||||
RETURNING id;
|
||||
`
|
||||
const vOrderHistory = [args.id, currentOrder.status, args.reason ?? "finished successfully"]
|
||||
const vOrderHistory = [orderId, currentOrder.status, args.reason ?? "finished successfully"]
|
||||
const newOrderHistoryResult = await this.getFirst(
|
||||
client.query<{ id: number }>(iOrderHistory, vOrderHistory)
|
||||
)
|
||||
@@ -352,6 +352,7 @@ export class OrderRepository {
|
||||
return updatedOrder
|
||||
}
|
||||
|
||||
// TODO: tema de poder filtrar por correlation_id
|
||||
public async errorOrder(args: {
|
||||
id: number,
|
||||
status: "failed" | "dlx",
|
||||
|
||||
Reference in New Issue
Block a user