Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/rtdb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
export async function updateRules(
projectId: string,
instance: string,
src: any,

Check warning on line 13 in src/rtdb.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type
options: { dryRun?: boolean } = {},
): Promise<void> {
const downstreamOptions: {
Expand All @@ -29,10 +29,10 @@
);
const client = new Client({ urlPrefix: origin });

return updateRulesWithClient(client, options);
return updateRulesWithClient(client, src, options);
}

export async function updateRulesWithClient(

Check warning on line 35 in src/rtdb.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing JSDoc comment

Check warning on line 35 in src/rtdb.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing return type on function
client: Client,
src: unknown,
options: { dryRun?: boolean } = {},
Expand All @@ -42,7 +42,7 @@
queryParams.dryRun = "true";
}

const response = await client.request<any, any>({

Check warning on line 45 in src/rtdb.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type

Check warning on line 45 in src/rtdb.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type
method: "PUT",
path: ".settings/rules.json",
queryParams,
Expand All @@ -50,7 +50,7 @@
resolveOnHTTPError: true,
});
if (response.status === 400) {
throw new FirebaseError(`Syntax error in database rules:\n\n${response.body.error}`);

Check warning on line 53 in src/rtdb.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe member access .error on an `any` value

Check warning on line 53 in src/rtdb.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Invalid type "any" of template literal expression
} else if (response.status > 400) {
throw new FirebaseError("Unexpected error while deploying database rules.", { exit: 2 });
}
Expand Down
Loading