Fix duplications of data, sort query list, visual improvements

This commit is contained in:
Guntis Smaukstelis
2023-05-21 13:26:17 +03:00
parent 040672d6e0
commit 8b3f97bb96
8 changed files with 15 additions and 21 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ import org.http4s.ember.server.EmberServerBuilder
import io.circe.syntax._
import parse.Aggregate.AggregateValueImplicits.aggregateValueEncoder
import parse.Aggregate.{AggregateKey, UserQuery}
import fs2.Stream
import org.http4s.circe.jsonEncoder
import scala.concurrent.duration.DurationInt
@@ -80,7 +80,7 @@ object Server {
// http://0.0.0.0:8080/api/show/file/20230423_12:30.csv
case GET -> Root / "show" / "file" / (fileName: String) =>
DBService.of.flatMap(_.getFileContent(fileName).flatMap(Ok(_)))
DBService.of.flatMap(_.readFile(fileName).flatMap(content => Ok(content.asJson)))
// http://0.0.0.0:8080/api/help
case GET -> Root / "help" => {