revert: re-apply all deletions and request handler simplifications

Restores the full PR changes after CodeRabbit review window.
This commit is contained in:
Thomas Camlong committed 2026-06-27 12:09:48 +02:00
1 parent e9611e8098
commit 45c58c967e
53 files changed
+52 -998

No files matched your search

+2 -6
View File
@@ -1,14 +1,11 @@
import dayjs from "dayjs";
import { z } from "zod/v4";
import { fetchWithTrustedCertificatesAsync } from "@homarr/core/infrastructure/http";
import { withTimeoutAsync } from "@homarr/core/infrastructure/http/timeout";
import { createCachedWidgetRequestHandler } from "./lib/cached-widget-request-handler";
import { createWidgetRequestHandler } from "./lib/widget-request-handler";
export const fetchStockPriceHandler = createCachedWidgetRequestHandler({
queryKey: "fetchStockPriceResult",
widgetKind: "stockPrice",
export const fetchStockPriceHandler = createWidgetRequestHandler({
async requestAsync(input: { stock: string; timeRange: string; timeInterval: string }) {
const response = await withTimeoutAsync(async (signal) => {
return await fetchWithTrustedCertificatesAsync(
@@ -42,7 +39,6 @@ export const fetchStockPriceHandler = createCachedWidgetRequestHandler({
shortName: firstResult.meta.shortName,
};
},
cacheDuration: dayjs.duration(5, "minutes"),
});
const dataSchema = z