mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 22:27:16 +01:00
Fixed resetAt lookup. Added teams GET.
This commit is contained in:
parent
5244d8608b
commit
d0aa266dce
2 changed files with 24 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { checkAuth } from '@/lib/auth';
|
||||
import { DEFAULT_PAGE_SIZE, FILTER_COLUMNS } from '@/lib/constants';
|
||||
import { getAllowedUnits, getMinimumUnit, maxDate, parseDateRange } from '@/lib/date';
|
||||
import { getAllowedUnits, getMinimumUnit, parseDateRange } from '@/lib/date';
|
||||
import { fetchWebsite } from '@/lib/load';
|
||||
import { filtersArrayToObject } from '@/lib/params';
|
||||
import { badRequest, unauthorized } from '@/lib/response';
|
||||
|
|
@ -83,8 +83,8 @@ export function getRequestFilters(query: Record<string, any>) {
|
|||
export async function setWebsiteDate(websiteId: string, data: Record<string, any>) {
|
||||
const website = await fetchWebsite(websiteId);
|
||||
|
||||
if (website) {
|
||||
data.startDate = maxDate(data.startDate, new Date(website?.resetAt));
|
||||
if (website?.resetAt) {
|
||||
data.startDate = new Date(website.resetAt);
|
||||
}
|
||||
|
||||
return data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue