develop #1
@ -32,7 +32,7 @@ func (s *OrderService) Log(format string, val ...any) {
|
||||
s.log.Log(format, val...)
|
||||
}
|
||||
|
||||
// FIXME: REFACTOR !!
|
||||
// Refactor
|
||||
func (s *OrderService) CreateOrder(ctx context.Context, basketID string) (*model.OrderModel, error) {
|
||||
basketAPI := api.NewBasketAPI(SERVICE_USER_AGENT, s.redis)
|
||||
basket, err := basketAPI.GetBasket(basketID)
|
||||
@ -67,7 +67,6 @@ func (s *OrderService) UpdateOrderStatus(reqID, orderID, status string) (string,
|
||||
|
||||
msg := &event.StatusUpdateEvent{Event: event.NewEvent(reqID), OrderID: orderID, Status: status}
|
||||
amqp.Publish(s.ebCh, "api-events", "order.email.statusUpdate", msg)
|
||||
// amqp.Publish(s.ebCh, "api-events", "order.warehouse.orderFinalized", msg) // test event...
|
||||
|
||||
return orderID, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user