Skip to content

Commit

Permalink
Add a self link to the status document, as required by ODL
Browse files Browse the repository at this point in the history
  • Loading branch information
llemeurfr committed Dec 28, 2024
1 parent 28b2447 commit c10afab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lsdserver/api/license_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,10 @@ func makeLinks(ls *licensestatuses.LicenseStatus) {

links := new([]licensestatuses.Link)

// add a self link (required by ODL)
link := licensestatuses.Link{Href: lsdBaseURL + "/licenses/" + ls.LicenseRef + "/status", Rel: "self", Type: api.ContentType_LSD_JSON, Templated: false}
*links = append(*links, link)

// if the link template to the license is set
if licenseLinkURL != "" {
licenseLinkURLFinal := expandUriTemplate(licenseLinkURL, "license_id", ls.LicenseRef)
Expand Down

0 comments on commit c10afab

Please sign in to comment.