style: auto-fix lint and format
This commit is contained in:
1 parent
26a8d219af
commit
2cb0964aa2
5 files changed
+31
-7
No files matched your search
@@ -13,7 +13,13 @@ import { createTRPCRouter, publicProcedure } from "../../trpc";
|
||||
const firewallMiddleware = createManyIntegrationMiddleware("query", ...getIntegrationKindsByCategory("firewall"));
|
||||
|
||||
// ponytail: can't extract a generic factory here because each handler returns a different data type
|
||||
const queryFirewall = <THandler extends { handler: (integration: any, input: any) => { getDataAsync: () => Promise<{ data: any; timestamp: Date }> } }>(handler: THandler) =>
|
||||
const queryFirewall = <
|
||||
THandler extends {
|
||||
handler: (integration: any, input: any) => { getDataAsync: () => Promise<{ data: any; timestamp: Date }> };
|
||||
},
|
||||
>(
|
||||
handler: THandler,
|
||||
) =>
|
||||
publicProcedure.concat(firewallMiddleware).query(async ({ ctx }) =>
|
||||
settleIntegrationQueries(ctx.integrations, async (integration) => {
|
||||
const { data, timestamp } = await handler.handler(integration, {}).getDataAsync();
|
||||
|
||||
Reference in new issue
Block a user