mirror of
https://github.com/aljazceru/enclava.git
synced 2025-12-17 15:34:36 +01:00
15 lines
507 B
TypeScript
15 lines
507 B
TypeScript
import { NextRequest, NextResponse } from 'next/server'
|
|
import { proxyRequest, handleProxyResponse } from '@/lib/proxy-auth'
|
|
|
|
export async function GET() {
|
|
try {
|
|
const response = await proxyRequest('/api-internal/v1/analytics/overview')
|
|
const data = await handleProxyResponse(response, 'Failed to fetch analytics overview')
|
|
return NextResponse.json(data)
|
|
} catch (error) {
|
|
return NextResponse.json(
|
|
{ error: 'Failed to fetch analytics overview' },
|
|
{ status: 500 }
|
|
)
|
|
}
|
|
} |