mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
17 lines
476 B
TypeScript
17 lines
476 B
TypeScript
import type { InsightsSummary } from '@n8n/api-types';
|
|
|
|
import { Get, GlobalScope, RestController } from '@/decorators';
|
|
|
|
import { InsightsService } from './insights.service';
|
|
|
|
@RestController('/insights')
|
|
export class InsightsController {
|
|
constructor(private readonly insightsService: InsightsService) {}
|
|
|
|
@Get('/summary')
|
|
@GlobalScope('insights:list')
|
|
async getInsightsSummary(): Promise<InsightsSummary> {
|
|
return await this.insightsService.getInsightsSummary();
|
|
}
|
|
}
|