diff --git a/src/resources/user.ts b/src/resources/user.ts index 53e4ecf..5f448c5 100644 --- a/src/resources/user.ts +++ b/src/resources/user.ts @@ -21,8 +21,8 @@ export default class User implements UserResource { return this; } - public at(locations: number | string): this { - this.filters.locations = locations; + public at(location: number | string): this { + this.filters.location = location; return this; } @@ -65,8 +65,8 @@ export default class User implements UserResource { params.service = this.filters.services; } - if (typeof this.filters.locations !== 'undefined') { - params.location = this.filters.locations; + if (typeof this.filters.location !== 'undefined') { + params.location = this.filters.location; } return params; diff --git a/src/types/filters.d.ts b/src/types/filters.d.ts index 7ffbeeb..1e03c7c 100644 --- a/src/types/filters.d.ts +++ b/src/types/filters.d.ts @@ -6,5 +6,5 @@ export interface Filterable { export interface UserFilter { assigned?: boolean; services?: number | number[] | string | string[]; - locations?: number | string; + location?: number | string; } diff --git a/src/types/resources.d.ts b/src/types/resources.d.ts index aa882e3..e46790f 100644 --- a/src/types/resources.d.ts +++ b/src/types/resources.d.ts @@ -7,7 +7,7 @@ export interface Resource { export interface UserResource extends Resource { assigned(assigned: boolean): this; - at(locations: number | string): this; + at(location: number | string): this; performing(services: number | number[] | string | string[]): this; }