Update compare parameter to use enum for valid values
This commit is contained in:
1 parent
6420f2c813
commit
a049fbb5b0
2 files changed
+2
-2
No files matched your search
@@ -31,7 +31,7 @@ export async function GET(
|
||||
|
||||
const data = await getWebsiteStats(websiteId, filters);
|
||||
|
||||
const compare = filters.compare === 'yoy' ? 'yoy' : 'prev';
|
||||
const compare = filters.compare ?? 'prev';
|
||||
|
||||
const { startDate, endDate } = getCompareDate(compare, filters.startDate, filters.endDate);
|
||||
|
||||
|
||||
Reference in new issue
Block a user