mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
finish CH query and clean up objects
This commit is contained in:
parent
15575d7783
commit
bf507037c7
4 changed files with 109 additions and 152 deletions
|
|
@ -7,12 +7,10 @@ import { getRetention } from 'queries';
|
|||
|
||||
export interface RetentionRequestBody {
|
||||
websiteId: string;
|
||||
window: string;
|
||||
dateRange: { window; startDate: string; endDate: string };
|
||||
}
|
||||
|
||||
export interface RetentionResponse {
|
||||
window: string;
|
||||
startAt: number;
|
||||
endAt: number;
|
||||
}
|
||||
|
|
@ -27,7 +25,6 @@ export default async (
|
|||
if (req.method === 'POST') {
|
||||
const {
|
||||
websiteId,
|
||||
window,
|
||||
dateRange: { startDate, endDate },
|
||||
} = req.body;
|
||||
|
||||
|
|
@ -38,7 +35,6 @@ export default async (
|
|||
const data = await getRetention(websiteId, {
|
||||
startDate: new Date(startDate),
|
||||
endDate: new Date(endDate),
|
||||
window: window,
|
||||
});
|
||||
|
||||
return ok(res, data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue