import { Global, Module } from '@nestjs/common';
import { APP_GUARD } from '@nestjs/core';
import { PermissionsGuard } from './permissions.guard';
import { RegionScopeService } from './region-scope.service';

@Global()
@Module({
  providers: [
    RegionScopeService,
    {
      provide: APP_GUARD,
      useClass: PermissionsGuard,
    },
  ],
  exports: [RegionScopeService],
})
export class CommonModule {}
