Skip to content

Commit

Permalink
OCLOMRS-923: Concept counts not displayed when using API2
Browse files Browse the repository at this point in the history
  • Loading branch information
ibacher committed Mar 3, 2021
1 parent 686bf26 commit 1347bb6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
15 changes: 14 additions & 1 deletion src/apps/containers/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,20 @@ import { authenticatedInstance } from "../../api";

const api = {
retrieve: (containerUrl: string) =>
authenticatedInstance.get(containerUrl, { params: { verbose: true } })
authenticatedInstance.get(containerUrl, {
params: {
verbose: true,
includeReferences: true
}
}),
versions: {
retrieve: (containerUrl: string) =>
authenticatedInstance.get(`${containerUrl}versions/`, {
params: {
verbose: true
}
})
}
};

export default api;
7 changes: 3 additions & 4 deletions src/apps/dictionaries/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ const api = {
}
},
versions: {
retrieve: (dictionaryUrl: string) =>
authenticatedInstance.get(`${dictionaryUrl}versions/?verbose=true`),
...containerAPI.versions,
create: (
dictionaryUrl: string,
data: DictionaryVersion
Expand All @@ -70,10 +69,10 @@ const api = {
authenticatedInstance.put(`${dictionaryUrl}${data.id}/`, data)
},
retrieveMappings: (
sourceUrl: string,
dictionaryUrl: string,
fromConceptIds: string[]
) =>
authenticatedInstance.get(`${sourceUrl}mappings/`, {
authenticatedInstance.get(`${dictionaryUrl}mappings/`, {
params: {
fromConcept: fromConceptIds.join(","),
limit: 0 // bad, todo optimize this
Expand Down
3 changes: 1 addition & 2 deletions src/apps/sources/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ const api = {
}),
},
},versions: {
retrieve: (sourceUrl: string) =>
authenticatedInstance.get(`${sourceUrl}versions/?verbose=true`),
...containerAPI.versions,
create: (
sourceUrl: string,
data: SourceVersion
Expand Down

0 comments on commit 1347bb6

Please sign in to comment.