Skip to content

Commit

Permalink
fix(organizations): fix organization resource interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
GermainBergeron committed Oct 7, 2019
1 parent 396e1f8 commit d758953
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/resources/Organizations/Organization.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import {PageModel} from '../BaseInterfaces';
import Resource from '../Resource';
import {CreateOrganizationOptions, ListOrganizationOptions, OrganizationModel} from './OrganizationInterfaces';

export default class Organization extends Resource {
static baseUrl = '/rest/organizations/';

list(options?: ListOrganizationOptions) {
return this.api.get<OrganizationModel[]>(this.buildPath(Organization.baseUrl, options));
return this.api.get<PageModel<OrganizationModel>>(this.buildPath(Organization.baseUrl, options));
}

create(options: CreateOrganizationOptions) {
Expand Down
4 changes: 2 additions & 2 deletions src/resources/Organizations/OrganizationInterfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ export interface OrganizationModel {
}

export interface ListOrganizationOptions {
additionalFields?: string[];
additionalFields?: string | string[];
filter?: string;
order?: 'ASC' | 'DESC';
order?: string;
page?: number;
perPage?: number;
sortBy?: string;
Expand Down

0 comments on commit d758953

Please sign in to comment.