wulf-pulse/app/api/addigy-policies/route.ts
Lorentz Hinrichsen 3c3124d8c9 Restructure: rename to Pulse and move app to root
- Renamed project from PSA-Utils to Pulse
- Moved all app files from autotask-app/ to root
- Updated package.json name to 'pulse'
- Updated Docker container names to pulse-app and pulse-redis
- Updated Docker network name to pulse-network
2025-10-28 23:08:54 -04:00

24 lines
639 B
TypeScript

import { NextResponse } from 'next/server';
import { getAddigyClient } from '@/lib/services/addigy-factory';
export async function GET(request: Request) {
try {
const addigyClient = getAddigyClient();
const policies = await addigyClient.getAllPolicies();
return NextResponse.json({
success: true,
data: policies,
count: policies.length,
});
} catch (error) {
console.error('Error fetching Addigy policies:', error);
return NextResponse.json(
{
success: false,
error: error instanceof Error ? error.message : 'Unknown error',
},
{ status: 500 }
);
}
}