Take out IO from parser

This commit is contained in:
Guntis Smaukstelis
2023-04-24 19:21:36 +03:00
parent 37a90c58ad
commit 04872bbc4d
3 changed files with 32 additions and 29 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ object Server extends IOApp {
case Some((from, to, cityList, aggregate)) => {
val res = for {
lines <- db.DBService.getInRange(from, to)
parsedData <- parse.Parser.queryData(lines, cityList, aggregate)
parsedData <- IO.pure(parse.Parser.queryData(lines, cityList, aggregate))
} yield parsedData
Ok(res.map(_.toString()))