updates on the admincontroller and the hubcity fix and queue orders

This commit is contained in:
2026-09-25 16:30:38 +05:30
parent ee79c80338
commit 44ba33eda2
7 changed files with 441 additions and 31 deletions

View File

@@ -61,6 +61,11 @@ func MilerStartDuty(c *fiber.Ctx) error {
})
db.DB.Model(&models.AppUser{}).Where("userid = ?", milerUserID).Update("onduty", 1)
// Make the rider findable by auto-assignment straight away, from the
// position they started duty at, instead of only after the app's first
// location ping. Skipped when the app sent no coordinates.
indexMilerLocation(milerUserID, req.Lat, req.Lon)
return utils.OK(c, fiber.Map{
"dutylogid": dutyLog.Dutylogid,
"loginat": dutyLog.Loginat,