style: auto-fix lint and format

This commit is contained in:
ajnart authored and github-actions[bot] committed 2026-06-25 09:57:29 +00:00
1 parent 26a8d219af
commit 2cb0964aa2
5 files changed
+31 -7

No files matched your search

+7 -1
View File
@@ -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();
@@ -19,7 +19,12 @@ export const healthMonitoringRouter = createTRPCRouter({
.query(async ({ ctx }) => {
return await settleIntegrationQueries(ctx.integrations, async (integration) => {
const { data, timestamp } = await systemInfoRequestHandler.handler(integration, {}).getDataAsync();
return { integrationId: integration.id, integrationName: integration.name, healthInfo: data, updatedAt: timestamp };
return {
integrationId: integration.id,
integrationName: integration.name,
healthInfo: data,
updatedAt: timestamp,
};
});
}),
getClusterHealthStatus: publicProcedure
@@ -24,7 +24,9 @@ export const mediaServerRouter = createTRPCRouter({
.input(z.object({ showOnlyPlaying: z.boolean() }))
.query(async ({ ctx, input }) => {
return await settleIntegrationQueries(ctx.integrations, async (integration) => {
const { data } = await mediaServerRequestHandler.handler(integration, { showOnlyPlaying: input.showOnlyPlaying }).getDataAsync();
const { data } = await mediaServerRequestHandler
.handler(integration, { showOnlyPlaying: input.showOnlyPlaying })
.getDataAsync();
return { integrationId: integration.id, integrationKind: integration.kind, sessions: data };
});
}),