import { posthog } from "../analytics"

// Middleware to log endpoint calls
export function trackEndpointCalls(req, res, next) {
  posthog.capture({
    distinctId: req.userId,
    event: `cfapi-endpoint-called-${req.path}`,
  })
  next()
}
