mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-14 21:10:34 +01:00
Fix getWebsites call.
This commit is contained in:
parent
4fd12c6c93
commit
2b10802e07
@ -13,7 +13,7 @@ export default async (req: NextApiRequestAuth, res: NextApiResponse<RealtimeInit
|
|||||||
if (req.method === 'GET') {
|
if (req.method === 'GET') {
|
||||||
const { id: userId } = req.auth.user;
|
const { id: userId } = req.auth.user;
|
||||||
|
|
||||||
const websites = await getUserWebsites(userId);
|
const websites = await getUserWebsites({ userId });
|
||||||
const ids = websites.map(({ id }) => id);
|
const ids = websites.map(({ id }) => id);
|
||||||
const token = createToken({ websites: ids }, secret());
|
const token = createToken({ websites: ids }, secret());
|
||||||
const data = await getRealtimeData(ids, subMinutes(new Date(), 30));
|
const data = await getRealtimeData(ids, subMinutes(new Date(), 30));
|
||||||
|
Loading…
Reference in New Issue
Block a user