Skip to content

Commit

Permalink
Merge pull request #103 from IQSS/100-get-dataset-optimize
Browse files Browse the repository at this point in the history
Optimize GetDataset use case by using includeFiles=false
  • Loading branch information
GPortas authored Nov 16, 2023
2 parents aa356a3 + 03005dd commit af43e45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/datasets/infra/repositories/DatasetsRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export class DatasetsRepository extends ApiRepository implements IDatasetsReposi
true,
{
includeDeaccessioned: includeDeaccessioned,
includeFiles: false
},
)
.then((response) => transformVersionResponseToDataset(response))
Expand Down
4 changes: 2 additions & 2 deletions test/unit/datasets/DatasetsRepository.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ describe('DatasetsRepository', () => {
describe('getDataset', () => {
const testIncludeDeaccessioned = false;
const expectedRequestConfigApiKey = {
params: { includeDeaccessioned: testIncludeDeaccessioned },
params: { includeDeaccessioned: testIncludeDeaccessioned, includeFiles: false },
headers: TestConstants.TEST_EXPECTED_AUTHENTICATED_REQUEST_CONFIG_API_KEY.headers,
};
const expectedRequestConfigSessionCookie = {
params: { includeDeaccessioned: testIncludeDeaccessioned },
params: { includeDeaccessioned: testIncludeDeaccessioned, includeFiles: false },
withCredentials: TestConstants.TEST_EXPECTED_AUTHENTICATED_REQUEST_CONFIG_SESSION_COOKIE.withCredentials,
headers: TestConstants.TEST_EXPECTED_AUTHENTICATED_REQUEST_CONFIG_SESSION_COOKIE.headers,
};
Expand Down

0 comments on commit af43e45

Please sign in to comment.