updates on the backend about the reverse logistics
This commit is contained in:
@@ -942,7 +942,9 @@ func MilerDeliverConsignment(c *fiber.Ctx) error {
|
||||
consignment.Status = constants.ConsignmentDelivered
|
||||
// Cleared once redeemed so the same code can't close out a second attempt.
|
||||
consignment.Deliveryotp = ""
|
||||
consignment.Updatedat = time.Now()
|
||||
nowDelivered := time.Now()
|
||||
consignment.Deliveredat = &nowDelivered
|
||||
consignment.Updatedat = nowDelivered
|
||||
if err := tx.Save(&consignment).Error; err != nil {
|
||||
tx.Rollback()
|
||||
return utils.Internal(c, "failed to mark consignment delivered")
|
||||
|
||||
Reference in New Issue
Block a user