mirror of
https://github.com/aljazceru/enclava.git
synced 2025-12-18 07:54:29 +01:00
clean commit
This commit is contained in:
16
frontend/src/app/api/analytics/overview/route.ts
Normal file
16
frontend/src/app/api/analytics/overview/route.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { NextRequest, NextResponse } from 'next/server'
|
||||
import { proxyRequest, handleProxyResponse } from '@/lib/proxy-auth'
|
||||
|
||||
export async function GET() {
|
||||
try {
|
||||
const response = await proxyRequest('/api/v1/analytics/overview')
|
||||
const data = await handleProxyResponse(response, 'Failed to fetch analytics overview')
|
||||
return NextResponse.json(data)
|
||||
} catch (error) {
|
||||
console.error('Error fetching analytics overview:', error)
|
||||
return NextResponse.json(
|
||||
{ error: 'Failed to fetch analytics overview' },
|
||||
{ status: 500 }
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user