cod.controller.ts 347 B

123456789101112
  1. import { Controller, Get, Req } from '@nestjs/common'
  2. import { Request } from 'express'
  3. import { CodService } from './cod.service'
  4. @Controller('cod')
  5. export class CodController {
  6. constructor(private readonly codService: CodService) {}
  7. @Get('getcod')
  8. async getcod(@Req() req: Request) {
  9. return await this.codService.getCod(req.ip)
  10. }
  11. }