Fix paths in docker images
This commit is contained in:
@@ -55,7 +55,7 @@ class DataService(log: Logger[IO]) {
|
||||
}
|
||||
|
||||
def getBinaryChunk(offset: Int, length: Int, fileName: String): IO[Array[Byte]] = {
|
||||
IO {
|
||||
IO.blocking {
|
||||
val source = Source.fromFile(s"$GRIB_FOLDER/$fileName", "ISO-8859-1")
|
||||
try {
|
||||
source.slice(offset, offset + length).map(_.toByte).toArray
|
||||
|
||||
@@ -62,7 +62,6 @@ class Server(postgresService: PostgresService, dataService: DataService, fetch:
|
||||
case GET -> Root / "show" / "grib-list" =>
|
||||
dataService.getFileList().flatMap(fileList => Ok(fileList.asJson))
|
||||
|
||||
// TODO implement binary-chunk/ get request
|
||||
case GET -> Root / "grib" / "binary-chunk" / ValidateInt(binaryOffset) / ValidateInt(binaryLength) / fileName =>
|
||||
dataService.getBinaryChunk(binaryOffset, binaryLength, fileName).flatMap(buffer => Ok(buffer))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user