Return full compliance report on PUT

This commit is contained in:
Eli Ribble 2026-04-13 19:32:22 +00:00
parent 9bca15ae7e
commit ba76c8b1db
No known key found for this signature in database
4 changed files with 35 additions and 38 deletions

View file

@ -97,7 +97,7 @@ func PublicReportMessageCreate(ctx context.Context, user User, public_id, messag
return nil, errors.New("no contact methods available")
}
}
func PublicReportUpdateCompliance(ctx context.Context, public_id string, report_setter models.PublicreportReportSetter, address *types.Address, location *types.Location) (*types.PublicReport, error) {
func PublicReportUpdateCompliance(ctx context.Context, public_id string, report_setter models.PublicreportReportSetter, address *types.Address, location *types.Location) (*types.PublicReportCompliance, error) {
txn, err := db.PGInstance.BobDB.BeginTx(ctx, nil)
if err != nil {
return nil, fmt.Errorf("create txn: %w", err)
@ -130,7 +130,7 @@ func PublicReportUpdateCompliance(ctx context.Context, public_id string, report_
}
}
txn.Commit(ctx)
return publicreport.ByID(ctx, public_id)
return publicreport.ByIDCompliance(ctx, public_id)
}
func PublicReportReporterUpdated(ctx context.Context, org_id int32, report_id string) {
event.Updated(event.TypeRMOPublicReport, org_id, report_id)