import { Controller, Get, Inject } from '@nestjs/common';
import { NetworkService } from './network.service';
import { ApiTags, ApiOperation } from '@nestjs/swagger';

@ApiTags('Network')
@Controller('network')
export class NetworkController {
  constructor(
    @Inject(NetworkService)
    private readonly networkService: NetworkService,
  ) {}

  @Get('adapters')
  @ApiOperation({ summary: '获取网络适配器网段' })
  async getNetworkAdapters() {
    return this.networkService.getNetworkAdapters();
  }
}
