Spaces:
Runtime error
Runtime error
| // src/weather.controller.ts | |
| import { Controller } from '@nestjs/common'; | |
| import { GrpcMethod } from '@nestjs/microservices'; | |
| import { WeatherApiService } from './weatherapi.service'; | |
| () | |
| export class WeatherApiController { | |
| constructor(private readonly weatherService: WeatherApiService) {} | |
| ('WeatherApiService', 'GetCurrentWeather') | |
| getCurrentWeather(data) { | |
| return this.weatherService.getCurrentWeather(data); | |
| } | |
| ('WeatherApiService', 'GetForecast') | |
| getForecast(data) { | |
| return this.weatherService.getForecast(data); | |
| } | |
| } | |