Skip to content

Commit

Permalink
Merge pull request #5 from VNG-Realisatie/fix/resultaten-not-returnin…
Browse files Browse the repository at this point in the history
…g-plurals

Fix procestypen embedded in resultaten to now show the correct url
  • Loading branch information
joerivrij authored Apr 12, 2023
2 parents 3e54635 + 7bde699 commit 2edae14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/v1/resultaat.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (r *ReferentielijstenHandler) ListResultaten(w http.ResponseWriter, req *ht
u, _ := url.JoinPath(scheme, req.Host, req.URL.Path, result.URL)
result.URL = u
procesTypeUUID := result.ProcesType
p, _ := url.JoinPath(scheme, req.Host, "api/v1/procestype", result.ProcesType)
p, _ := url.JoinPath(scheme, req.Host, "api/v1/procestypen", result.ProcesType)
result.ProcesType = p

if procesType != "" {
Expand Down Expand Up @@ -209,7 +209,7 @@ func (r *ReferentielijstenHandler) GetResultaat(w http.ResponseWriter, req *http
if result.URL == uuid {
u, _ := url.JoinPath(scheme, req.Host, req.RequestURI)
result.URL = u
p, _ := url.JoinPath(scheme, req.Host, "api/v1/procestype", result.ProcesType)
p, _ := url.JoinPath(scheme, req.Host, "api/v1/procestypen", result.ProcesType)
result.ProcesType = p
middleware.ResponseWithCode(w, http.StatusOK, result)
return
Expand Down

0 comments on commit 2edae14

Please sign in to comment.