mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 06:37:18 +01:00
Add timezone to report queries.
This commit is contained in:
parent
820ad69d60
commit
29a943df9c
7 changed files with 32 additions and 6 deletions
|
|
@ -8,6 +8,7 @@ import { getRetention } from 'queries';
|
|||
export interface RetentionRequestBody {
|
||||
websiteId: string;
|
||||
dateRange: { window; startDate: string; endDate: string };
|
||||
timezone: string;
|
||||
}
|
||||
|
||||
export interface RetentionResponse {
|
||||
|
|
@ -26,6 +27,7 @@ export default async (
|
|||
const {
|
||||
websiteId,
|
||||
dateRange: { startDate, endDate },
|
||||
timezone,
|
||||
} = req.body;
|
||||
|
||||
if (!(await canViewWebsite(req.auth, websiteId))) {
|
||||
|
|
@ -35,6 +37,7 @@ export default async (
|
|||
const data = await getRetention(websiteId, {
|
||||
startDate: new Date(startDate),
|
||||
endDate: new Date(endDate),
|
||||
timezone,
|
||||
});
|
||||
|
||||
return ok(res, data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue