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
This commit is contained in:
parent
f429f3af54
commit
3c3124d8c9
117 changed files with 8433 additions and 239 deletions
32
app/api/rmm-test/route.ts
Normal file
32
app/api/rmm-test/route.ts
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import { NextRequest, NextResponse } from 'next/server';
|
||||
import { getDattoRMMClient } from '@/lib/services/datto-rmm-factory';
|
||||
|
||||
export async function GET(request: NextRequest) {
|
||||
try {
|
||||
console.log('Testing Datto RMM connection...');
|
||||
|
||||
const rmmClient = getDattoRMMClient();
|
||||
|
||||
// Try to get sites as a test
|
||||
const sites = await rmmClient.getSites();
|
||||
|
||||
return NextResponse.json({
|
||||
success: true,
|
||||
message: 'Successfully connected to Datto RMM',
|
||||
sitesCount: sites.length,
|
||||
sites: sites.slice(0, 5).map(s => ({
|
||||
id: s.id,
|
||||
name: s.name,
|
||||
description: s.description
|
||||
}))
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('RMM test failed:', error);
|
||||
|
||||
return NextResponse.json({
|
||||
success: false,
|
||||
error: error instanceof Error ? error.message : 'Unknown error',
|
||||
hint: 'Check console for detailed error information'
|
||||
}, { status: 500 });
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue