MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / getLiveVisitors

Function getLiveVisitors

apps/api/src/controllers/insights.controller.ts:172–178  ·  view source on GitHub ↗
(
  req: FastifyRequest<{ Params: { projectId: string } }>,
  reply: FastifyReply
)

Source from the content-addressed store, hash-verified

170// ---------------------------------------------------------------------------
171
172export async function getLiveVisitors(
173 req: FastifyRequest<{ Params: { projectId: string } }>,
174 reply: FastifyReply
175) {
176 const projectId = await getProjectId(req as RequestWithProjectParam);
177 reply.send({ visitors: await eventBuffer.getActiveVisitorCount(projectId) });
178}
179
180// ---------------------------------------------------------------------------
181// Analytics — active users

Callers

nothing calls this directly

Calls 3

getActiveVisitorCountMethod · 0.80
getProjectIdFunction · 0.70
sendMethod · 0.45

Tested by

no test coverage detected