Fix parsing db url, remove 24h state, add db saving

This commit is contained in:
Guntis Smaukstelis
2023-12-10 20:37:53 +02:00
parent f956d658d5
commit 8f2ade2fcf
5 changed files with 51 additions and 41 deletions
+3 -3
View File
@@ -106,9 +106,9 @@ class Server(dataService: DataService, fetch: FetchService, log: Logger[IO]) {
dataService.readFile(fileName).flatMap(content => Ok(content.asJson))
// http://0.0.0.0:8080/api/getLast24hours
case GET -> Root / "getLast24hours" => {
dataService.getLast24Hours.flatMap(content => Ok(content.asJson.pretty))
}
// case GET -> Root / "getLast24hours" => {
// dataService.getLast24Hours.flatMap(content => Ok(content.asJson.pretty))
// }
// http://0.0.0.0:8080/api/help
case GET -> Root / "help" => {