diff --git a/src/lib/types.ts b/src/lib/types.ts index d567113459..e659655202 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -149,19 +149,6 @@ export interface WebsiteStats { totalTime: { value: number; change: number }; } -export interface RealtimeInit { - websites: Website[]; - token: string; - data: RealtimeUpdate; -} - -export interface RealtimeUpdate { - pageviews: any[]; - sessions: any[]; - events: any[]; - timestamp: number; -} - export interface DateRange { value: string; startDate: Date; diff --git a/src/pages/api/realtime/[websiteId].ts b/src/pages/api/realtime/[websiteId].ts index eeecae894a..82854f1c17 100644 --- a/src/pages/api/realtime/[websiteId].ts +++ b/src/pages/api/realtime/[websiteId].ts @@ -1,7 +1,7 @@ import { startOfMinute, subMinutes } from 'date-fns'; import { canViewWebsite } from 'lib/auth'; import { useAuth, useValidate } from 'lib/middleware'; -import { NextApiRequestQueryBody, RealtimeInit } from 'lib/types'; +import { NextApiRequestQueryBody } from 'lib/types'; import { NextApiResponse } from 'next'; import { methodNotAllowed, ok, unauthorized } from 'next-basics'; import { getRealtimeData } from 'queries'; @@ -20,10 +20,7 @@ const schema = { }), }; -export default async ( - req: NextApiRequestQueryBody, - res: NextApiResponse, -) => { +export default async (req: NextApiRequestQueryBody, res: NextApiResponse) => { await useAuth(req, res); await useValidate(schema, req, res);