Skip to content

Commit

Permalink
fix(sessions): remove conditional request options causing incorrect p…
Browse files Browse the repository at this point in the history
…arams
  • Loading branch information
RobertCraigie committed Jan 15, 2025
1 parent b013f25 commit 030d5b2
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/resources/sessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,7 @@ export class Sessions extends APIResource {
/**
* Creates a new session with the provided configuration.
*/
create(body?: SessionCreateParams, options?: Core.RequestOptions): Core.APIPromise<Session>;
create(options?: Core.RequestOptions): Core.APIPromise<Session>;
create(
body: SessionCreateParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
): Core.APIPromise<Session> {
if (isRequestOptions(body)) {
return this.create({}, body);
}
create(body: SessionCreateParams = {}, options?: Core.RequestOptions): Core.APIPromise<Session> {
return this._client.post('/v1/sessions', { body, ...options });
}

Expand Down

0 comments on commit 030d5b2

Please sign in to comment.