Skip to content

Commit

Permalink
Include broader and narrower property in concept download (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandesu committed Sep 19, 2024
1 parent dea80b9 commit 51228cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/server/backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ export class ApiBackend {
}

async getConcept(uri) {
// TODO: Also load narrower concepts?
return (await this.registry.getConcepts({ concepts: [{ uri }] }))?.[0]
let properties = this.registry._defaultParams?.properties || ""
properties += (properties ? "," : "") + "broader,ancestors,narrower"
return (await this.registry.getConcepts({ concepts: [{ uri }], params: { properties } }))?.[0]
}

toString() {
Expand Down

0 comments on commit 51228cf

Please sign in to comment.