Fix reference to URI route names

This commit is contained in:
Eli Ribble 2026-05-12 17:30:38 +00:00
parent b41839a5ee
commit 60654579ae
No known key found for this signature in database

View file

@ -170,19 +170,19 @@ func (res *communicationR) hydrateCommunication(comm modelpublic.Communication,
switch rr.Type { switch rr.Type {
case platform.RelatedRecordTypeEmail: case platform.RelatedRecordTypeEmail:
r_type = resourceTypeEmail r_type = resourceTypeEmail
uri, err = res.router.IDStrToURI("email.GetByID", rr.ID) uri, err = res.router.IDStrToURI("email.ByIDGet", rr.ID)
case platform.RelatedRecordTypeReportCompliance: case platform.RelatedRecordTypeReportCompliance:
r_type = resourceTypeReportCompliance r_type = resourceTypeReportCompliance
uri, err = res.router.IDStrToURI("publicreport.compliance.GetByID", rr.ID) uri, err = res.router.IDStrToURI("publicreport.compliance.ByIDGet", rr.ID)
case platform.RelatedRecordTypeReportNuisance: case platform.RelatedRecordTypeReportNuisance:
r_type = resourceTypeReportNuisance r_type = resourceTypeReportNuisance
uri, err = res.router.IDStrToURI("publicreport.nuisance.GetByID", rr.ID) uri, err = res.router.IDStrToURI("publicreport.nuisance.ByIDGet", rr.ID)
case platform.RelatedRecordTypeReportWater: case platform.RelatedRecordTypeReportWater:
r_type = resourceTypeReportWater r_type = resourceTypeReportWater
uri, err = res.router.IDStrToURI("publicreport.water.GetByID", rr.ID) uri, err = res.router.IDStrToURI("publicreport.water.ByIDGet", rr.ID)
case platform.RelatedRecordTypeText: case platform.RelatedRecordTypeText:
r_type = resourceTypeText r_type = resourceTypeText
uri, err = res.router.IDStrToURI("text.GetByID", rr.ID) uri, err = res.router.IDStrToURI("text.ByIDGet", rr.ID)
default: default:
r_type = resourceTypeUnknown r_type = resourceTypeUnknown
err = fmt.Errorf("unrecognized related record type '%s'", rr.Type) err = fmt.Errorf("unrecognized related record type '%s'", rr.Type)