updates on the backend about the reverse logistics

This commit is contained in:
2026-10-10 12:40:42 +05:30
parent 153be40e5c
commit d1947dcd7a
6 changed files with 233 additions and 82 deletions

View File

@@ -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")