Initial LisgloSIPS V2 implementation
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { Controller, Get, Inject, Query } from '@nestjs/common';
|
||||
import { ApiTags } from '@nestjs/swagger';
|
||||
import { RequirePermissions } from '../security/security.metadata.js';
|
||||
import { DashboardService } from './dashboard.service.js';
|
||||
|
||||
@ApiTags('dashboard')
|
||||
@Controller('dashboard')
|
||||
export class DashboardController {
|
||||
constructor(@Inject(DashboardService) private readonly dashboardService: DashboardService) {}
|
||||
|
||||
@Get('summary')
|
||||
@RequirePermissions('dashboard.view')
|
||||
summary() {
|
||||
return this.dashboardService.summary();
|
||||
}
|
||||
|
||||
@Get('trends')
|
||||
@RequirePermissions('dashboard.view')
|
||||
trends(@Query() query: { hours?: string; bucketMinutes?: string }) {
|
||||
return this.dashboardService.trends(query);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user