submissions: add StatusMessage to submissions

This commit is contained in:
Quaternions 2025-03-18 16:04:40 -07:00
parent ff01abdd63
commit 483ffd1d66
2 changed files with 2 additions and 0 deletions
pkg
model
service_internal

@ -47,4 +47,5 @@ type Submission struct {
Completed bool // Has this version of the map been completed at least once on maptest
TargetAssetID int64 // where to upload map fix. if the TargetAssetID is 0, it's a new map.
StatusID Status
StatusMessage string
}

@ -48,6 +48,7 @@ func (svc *Service) ActionSubmissionAccepted(ctx context.Context, params interna
// transaction
smap := datastore.Optional()
smap.Add("status_id", model.StatusAccepted)
smap.Add("status_message", params.StatusMessage)
return svc.DB.Submissions().IfStatusThenUpdate(ctx, params.SubmissionID, []model.Status{model.StatusValidating}, smap)
}