Add parseOptions function
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { BaseEndpoint } from './base';
|
||||
import { ExternalIdOptions, FindResult } from '../types';
|
||||
import { parseOptions } from '../utils';
|
||||
|
||||
export class FindEndpoint extends BaseEndpoint {
|
||||
constructor(accessToken: string) {
|
||||
@@ -7,7 +8,7 @@ export class FindEndpoint extends BaseEndpoint {
|
||||
}
|
||||
|
||||
async byId(externalId: string, options: ExternalIdOptions): Promise<FindResult> {
|
||||
const params = new URLSearchParams(Object.entries(options)).toString();
|
||||
const params = parseOptions(options);
|
||||
return await this.api.get<FindResult>(`/find/${externalId}?${params}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user