관리자 목록과 이미지 설정 개선
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { requireAdminSession } from '../../../../utils/admin-auth.js'
|
||||
import { getAnalyticsSummary } from '../../../../repositories/analytics-repository.js'
|
||||
import { getPublicBlogStatistics } from '../../../../repositories/blog-statistics-repository.js'
|
||||
|
||||
/**
|
||||
* 관리자 통계 요약 API
|
||||
@@ -13,5 +14,15 @@ export default defineEventHandler(async (event) => {
|
||||
const days = Number(query.days) || 30
|
||||
const period = String(query.period || 'weekly')
|
||||
|
||||
return getAnalyticsSummary({ days, period })
|
||||
const [summary, statistics] = await Promise.all([
|
||||
getAnalyticsSummary({ days, period }),
|
||||
getPublicBlogStatistics()
|
||||
])
|
||||
|
||||
return {
|
||||
...summary,
|
||||
totalVisitors: statistics.totalVisitors,
|
||||
totalPageViews: statistics.totalPageViews,
|
||||
totalPosts: statistics.totalPosts
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user