import { computeAllAlerts } from '../../../utils/adminAlerts.js'

export default defineEventHandler(async (event) => {
  const admin = await requireAdmin(event)
  const adminId = admin._id.toString()
  const alerts = await computeAllAlerts(adminId)
  return { alerts }
})
