Skip to content

Commit

Permalink
review_state is not a search option
Browse files Browse the repository at this point in the history
rels #58
  • Loading branch information
tdesvenain committed Jan 31, 2018
1 parent c8c9e4a commit d24e7c6
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -13,6 +13,7 @@
- Since angular2-schema-form dependency has been removed,
edit forms are not anymore auto-generated by angular2-schema-form by default.

- `review_state` is not a possible search *option* anymore. It is now a possible search criterion only.

## New features

Expand Down
1 change: 0 additions & 1 deletion docs/reference/services.rst
Expand Up @@ -95,7 +95,6 @@ Methods:
The `options` parameter can contain the following attributes:

- sort_on: string, name of the index used to sort the result.
- review_state: string, name of the review state to filter by
- metadata_fields: string[], list of extra metadata fields to retrieve
- start: number, rank of the first item (used for batching, default is 0),
- size: number, length of the batching (default is 20)
Expand Down
1 change: 0 additions & 1 deletion src/interfaces.ts
Expand Up @@ -79,7 +79,6 @@ export interface Comment {
export interface SearchOptions {
sort_on?: string;
sort_order?: string;
review_state?: string;
metadata_fields?: string[];
start?: number;
size?: number;
Expand Down
2 changes: 1 addition & 1 deletion src/services/resource.service.spec.ts
Expand Up @@ -193,7 +193,7 @@ describe('ResourceService', () => {
],
'items_total': 1
};
service.find({ SearchableText: 'John' }, '', { review_state: 'private' }).subscribe((content: any) => {
service.find({ SearchableText: 'John', review_state: 'private' }, '').subscribe((content: any) => {
id = content.items[0]['@id'];
});

Expand Down
3 changes: 0 additions & 3 deletions src/services/resource.service.ts
Expand Up @@ -49,9 +49,6 @@ export class ResourceService {
if (options.sort_order) {
params.push('sort_order=' + options.sort_order);
}
if (options.review_state) {
params.push('review_state=' + options.review_state);
}
if (options.metadata_fields) {
options.metadata_fields.map((field: any) => {
params.push('metadata_fields:list=' + field);
Expand Down

0 comments on commit d24e7c6

Please sign in to comment.