style: auto-fix lint and format
This commit is contained in:
1 parent
fe35a9cf68
commit
db64ded3f0
3 files changed
+6
-7
No files matched your search
@@ -16,7 +16,10 @@ export const audioStatsRouter = createTRPCRouter({
|
|||||||
return (await handler.getCachedOrUpdatedDataAsync({ forceUpdate: false })).data;
|
return (await handler.getCachedOrUpdatedDataAsync({ forceUpdate: false })).data;
|
||||||
},
|
},
|
||||||
audiobookshelf: async () => {
|
audiobookshelf: async () => {
|
||||||
const handler = audiobookshelfRequestHandler.handler({ ...ctx.integration, kind: "audiobookshelf" as const }, {});
|
const handler = audiobookshelfRequestHandler.handler(
|
||||||
|
{ ...ctx.integration, kind: "audiobookshelf" as const },
|
||||||
|
{},
|
||||||
|
);
|
||||||
return (await handler.getCachedOrUpdatedDataAsync({ forceUpdate: false })).data;
|
return (await handler.getCachedOrUpdatedDataAsync({ forceUpdate: false })).data;
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|||||||
@@ -69,10 +69,7 @@ export class NavidromeIntegration extends Integration {
|
|||||||
|
|
||||||
private async getArtistCountAsync(): Promise<number> {
|
private async getArtistCountAsync(): Promise<number> {
|
||||||
const response = await this.subsonicRequestAsync("/rest/getArtists.view", {}, { tolerateEmptyLibrary: true });
|
const response = await this.subsonicRequestAsync("/rest/getArtists.view", {}, { tolerateEmptyLibrary: true });
|
||||||
return asArray(response.artists?.index).reduce(
|
return asArray(response.artists?.index).reduce((count, index) => count + asArray(index.artist).length, 0);
|
||||||
(count, index) => count + asArray(index.artist).length,
|
|
||||||
0,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async getAlbumAndSongCountsAsync(): Promise<{ albumCount: number; songCount: number }> {
|
private async getAlbumAndSongCountsAsync(): Promise<{ albumCount: number; songCount: number }> {
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ export class UptimeKumaIntegration extends Integration {
|
|||||||
.map((monitor) => monitor.uptimePercent24h)
|
.map((monitor) => monitor.uptimePercent24h)
|
||||||
.filter((value): value is number => value !== null);
|
.filter((value): value is number => value !== null);
|
||||||
|
|
||||||
const averageUptimePercent =
|
const averageUptimePercent = uptimeValues.reduce((sum, value) => sum + value, 0) / Math.max(uptimeValues.length, 1);
|
||||||
uptimeValues.reduce((sum, value) => sum + value, 0) / Math.max(uptimeValues.length, 1);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
totalMonitors: monitors.length,
|
totalMonitors: monitors.length,
|
||||||
|
|||||||
Reference in new issue
Block a user