aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2020-04-20 10:15:45 +0200
committerIgor Pashev <pashev.igor@gmail.com>2020-04-20 10:15:45 +0200
commit2f2239ddd85775f366c0e8f5fcf4bb40d1c09ec8 (patch)
tree664255dabb853212dd85c11c4604aa4fd5e3f678
parent0b1981ef40404802a828f2a91ecadba3c2453034 (diff)
downloadopenweathermap-2f2239ddd85775f366c0e8f5fcf4bb40d1c09ec8.tar.gz
Factor out endpoints
-rw-r--r--lib/Web/OpenWeatherMap/API.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Web/OpenWeatherMap/API.hs b/lib/Web/OpenWeatherMap/API.hs
index 6d06421..b9624f8 100644
--- a/lib/Web/OpenWeatherMap/API.hs
+++ b/lib/Web/OpenWeatherMap/API.hs
@@ -27,10 +27,10 @@ type GetForecastWeather = AppId :> Get '[ JSON] ForecastWeather
type AppId = QueryParam "appid" String
type Current
- = "weather" :> QueryParam "q" String :> GetCurrentWeather :<|> "weather" :> QueryParam "lat" Double :> QueryParam "lon" Double :> GetCurrentWeather
+ = "weather" :> (QueryParam "q" String :> GetCurrentWeather :<|> QueryParam "lat" Double :> QueryParam "lon" Double :> GetCurrentWeather)
type Forecast
- = "forecast" :> QueryParam "q" String :> GetForecastWeather :<|> "forecast" :> QueryParam "lat" Double :> QueryParam "lon" Double :> GetForecastWeather
+ = "forecast" :> (QueryParam "q" String :> GetForecastWeather :<|> QueryParam "lat" Double :> QueryParam "lon" Double :> GetForecastWeather)
type API = Current :<|> Forecast