Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyblasczyk committed Jan 20, 2025
1 parent 8fcdc38 commit b8bbefc
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions apps/event-worker/src/resource-scan/google/vpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,14 @@ import { getGoogleClient } from "./client.js";

const log = logger.child({ label: "resource-scan/google/vpc" });

const getNetworksClient = async (targetPrincipal?: string | null) => {
const [networksClient] = await getGoogleClient(
NetworksClient,
targetPrincipal,
"Networks Client",
);
const [subnetsClient] = await getGoogleClient(
SubnetworksClient,
targetPrincipal,
"Subnets Client",
);
return { networksClient, subnetsClient };
};
const getNetworksClient = async (targetPrincipal?: string | null) =>
Promise.all([
getGoogleClient(NetworksClient, targetPrincipal, "Networks Client"),
getGoogleClient(SubnetworksClient, targetPrincipal, "Subnets Client"),
]).then(([[networksClient], [subnetsClient]]) => ({
networksClient,
subnetsClient,
}));

const getSubnetDetails = (
subnetsClient: SubnetworksClient,
Expand Down

0 comments on commit b8bbefc

Please sign in to comment.