import { Controller, Get } from '@nestjs/common';
import { Paginate, PaginateQuery } from 'nestjs-paginate';
import { PermissionService } from '../services/permission.service';

@Controller('admin/permissions')
export class PermissionsController {
  constructor(private readonly permissionService: PermissionService) {}

  @Get()
  async index(@Paginate() query: PaginateQuery) {
    return await this.permissionService.index(query);
  }
}
