Skip to content

Commit

Permalink
Converts parameter name to make more since since its a single value
Browse files Browse the repository at this point in the history
  • Loading branch information
coconutcraig committed Nov 15, 2018
1 parent ad9529e commit 75a78ca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/resources/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/types/filters.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export interface Filterable<T> {
export interface UserFilter {
assigned?: boolean;
services?: number | number[] | string | string[];
locations?: number | string;
location?: number | string;
}
2 changes: 1 addition & 1 deletion src/types/resources.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 75a78ca

Please sign in to comment.