import { ActiveUserGuard } from '@energyweb/origin-backend-utils' ; import { Controller , Get , HttpStatus , UseGuards } from '@nestjs/common' ; import { AuthGuard } from '@nestjs/passport' ; import { ApiBearerAuth , ApiResponse , ApiTags } from '@nestjs/swagger' ; import { BlockchainPropertiesDTO } from './blockchain-properties.dto' ; import { BlockchainPropertiesService } from './blockchain-properties.service' ; @ ApiTags ( 'blockchain-properties' ) @ ApiBearerAuth ( 'access-token' ) @ Controller ( 'blockchain-properties' ) export class BlockchainPropertiesController { constructor ( private readonly blockchainPropertiesService ) { } @ Get ( ) @ UseGuards ( AuthGuard ( ) , ActiveUserGuard ) @ ApiResponse ( { status : HttpStatus . OK , type : BlockchainPropertiesDTO , description : 'Returns blockchain properties' } ) public async get ( ) { return this . blockchainPropertiesService . dto ( ) ; } }