import { Router } from 'express'

import { getAdminDashboardSummary } from '../../services/admin/admin-dashboard-service.js'
import { createJsonHandler } from './shared.js'

const router = Router()

router.get('/dashboard/summary', createJsonHandler(
  () => getAdminDashboardSummary(),
  {
    successMessage: 'ok',
    errorMessage: '读取后台概览失败',
    scope: '[admin/dashboard/summary]',
  },
))

export default router
