Skip to content

Commit

Permalink
fix(client.ts): add missing semicolon after wait property in buildIng…
Browse files Browse the repository at this point in the history
…estEndpoint method

fix(client.ts): fix condition to check req.wait property instead of wait variable
  • Loading branch information
chronark committed May 9, 2024
1 parent dc1cf98 commit 9b3dafc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export class Tinybird {
public buildIngestEndpoint<TSchema extends z.ZodSchema<any>>(req: {
datasource: string;
event: TSchema;
wait?: boolean
wait?: boolean;
}): (
events: z.input<TSchema> | z.input<TSchema>[],
) => Promise<z.infer<typeof eventIngestReponseData>> {
Expand All @@ -139,8 +139,8 @@ export class Tinybird {
const url = new URL("/v0/events", this.baseUrl);
url.searchParams.set("name", req.datasource);

if (wait) {
url.searchParams.set("wait", "true");
if (req.wait) {
url.searchParams.set("wait", "true");
}

const body = (Array.isArray(validatedEvents) ? validatedEvents : [validatedEvents])
Expand Down

0 comments on commit 9b3dafc

Please sign in to comment.