import { getActiveSessions } from '../utils/liveSessions.js'

export default defineEventHandler(async (event) => {
  if (!event.context.user) return []
  const sessions = await getActiveSessions()
  return sessions
})
