public async Task <WeatherModel> GetWeather() { Access.CheckRole("Admin"); var weatherType = await WeatherServer.GetWeather(); return(new WeatherModel { Date = DateTime.UtcNow, WeatherType = weatherType }); }
public async Task Handle(SetWeatherCommand command) { Access.CheckRole("Admin"); await WeatherServer.SetWeather(command.WeatherType); }