From 2ee82cdd150a611e661df3af4a2b29e158342c83 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Tue, 12 Apr 2022 17:35:24 -0400 Subject: [PATCH] fix: embed bug --- src/pages/dashboards/embed/[id].tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/dashboards/embed/[id].tsx b/src/pages/dashboards/embed/[id].tsx index f4b8dd7..04a3c76 100644 --- a/src/pages/dashboards/embed/[id].tsx +++ b/src/pages/dashboards/embed/[id].tsx @@ -5,6 +5,7 @@ import { DashboardItem } from "../../../backend/dashboards"; import { DisplayForecasts } from "../../../web/display/DisplayForecasts"; import { FrontendForecast } from "../../../web/platforms"; import { getDashboardForecastsByDashboardId } from "../../../web/worker/getDashboardForecasts"; +import { reqToBasePath } from "../../../web/utils"; interface Props { dashboardForecasts: FrontendForecast[]; @@ -21,6 +22,7 @@ export const getServerSideProps: GetServerSideProps = async ( const { dashboardItem, dashboardForecasts } = await getDashboardForecastsByDashboardId({ dashboardId, + basePath: reqToBasePath(context.req), // required on server side to find the API endpoint }); if (!dashboardItem) {