mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-24 18:26:20 +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') {
|
||||
const { id: userId } = req.auth.user;
|
||||
|
||||
const websites = await getUserWebsites(userId);
|
||||
const websites = await getUserWebsites({ userId });
|
||||
const ids = websites.map(({ id }) => id);
|
||||
const token = createToken({ websites: ids }, secret());
|
||||
const data = await getRealtimeData(ids, subMinutes(new Date(), 30));
|
||||
|
Loading…
Reference in New Issue
Block a user