mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-17 11:06:30 +02:00
Add timezone offset to fix bad display
This commit is contained in:
@@ -42,9 +42,14 @@ export async function getResourceStatusHistory(
|
||||
|
||||
const entityType = "resource";
|
||||
const entityId = parsedParams.data.resourceId;
|
||||
const { days } = parsedQuery.data;
|
||||
const { days, tzOffsetMinutes } = parsedQuery.data;
|
||||
|
||||
const data = await getCachedStatusHistory(entityType, entityId, days);
|
||||
const data = await getCachedStatusHistory(
|
||||
entityType,
|
||||
entityId,
|
||||
days,
|
||||
tzOffsetMinutes
|
||||
);
|
||||
|
||||
return response<StatusHistoryResponse>(res, {
|
||||
data,
|
||||
|
||||
@@ -42,9 +42,14 @@ export async function getSiteStatusHistory(
|
||||
|
||||
const entityType = "site";
|
||||
const entityId = parsedParams.data.siteId;
|
||||
const { days } = parsedQuery.data;
|
||||
const { days, tzOffsetMinutes } = parsedQuery.data;
|
||||
|
||||
const data = await getCachedStatusHistory(entityType, entityId, days);
|
||||
const data = await getCachedStatusHistory(
|
||||
entityType,
|
||||
entityId,
|
||||
days,
|
||||
tzOffsetMinutes
|
||||
);
|
||||
|
||||
return response<StatusHistoryResponse>(res, {
|
||||
data,
|
||||
|
||||
Reference in New Issue
Block a user