Skip to content

Commit

Permalink
Switches questions service filter to use new filter on backend which …
Browse files Browse the repository at this point in the history
…is more inline on what we are wanting to retrieve
  • Loading branch information
coconutcraig committed Jun 24, 2019
1 parent 5bd1936 commit 7f43f42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/resources/question.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ it('can get questions with additional parameters', async () => {
expect(mockAxios.get).toHaveBeenCalledTimes(1);
expect(mockAxios.get).toHaveBeenCalledWith('questions', {
params: {
'filter[service]': 3,
'filter[matching]': 3,
limit: 5,
page: 1,
sort: 'created',
Expand Down
4 changes: 2 additions & 2 deletions src/resources/question.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface QuestionFilter {
}

export interface QuestionParameters {
service?: number | number[] | string | string[];
matching?: number | number[] | string | string[];
}

export interface QuestionResource extends Pageable, ConditionalResource {
Expand Down Expand Up @@ -84,7 +84,7 @@ export default class Question extends Conditional implements QuestionResource {
const params: QuestionParameters = {};

if (typeof this.filters.services !== 'undefined') {
params.service = this.filters.services;
params.matching = this.filters.services;
}

return params;
Expand Down

0 comments on commit 7f43f42

Please sign in to comment.