import { Controller, Get, UseGuards } from '@nestjs/common';
import { PermissionGuard } from '../../common/auth/permission.guard';
import { RequirePermission } from '../../common/auth/permission.decorator';
import { ConsistencyService } from './consistency.service';

@Controller('consistency')
export class ConsistencyController {
  constructor(private readonly consistencyService: ConsistencyService) {}

  @Get()
  @UseGuards(PermissionGuard)
  @RequirePermission('consistency:view')
  run() {
    return this.consistencyService.run();
  }
}
