Skip to content

Commit

Permalink
POST api call apiVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
yash-rajpal committed Nov 18, 2024
1 parent db84437 commit af642f2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/lib/services/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,13 @@ class Sdk {
MatchPathPattern<TPath>
>
? void
: Serialized<OperationParams<'POST', MatchPathPattern<TPath>>>
: Serialized<OperationParams<'POST', MatchPathPattern<TPath>>>,
apiVersion: string = 'v1'
): Promise<ResultFor<'POST', MatchPathPattern<TPath>>> {
return new Promise(async (resolve, reject) => {
const isMethodCall = endpoint?.startsWith('method.call/');
try {
const result = await this.current.post(endpoint, params);
const result = await this.current.post(endpoint, params, undefined, undefined, undefined, apiVersion);

/**
* if API_Use_REST_For_DDP_Calls is enabled and it's a method call,
Expand Down

0 comments on commit af642f2

Please sign in to comment.