Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #325 from StarryKira/v1.0.9
Browse files Browse the repository at this point in the history
fix get_image
  • Loading branch information
fuqiuluo authored Jun 6, 2024
2 parents 2db187e + 1d6ac3e commit be9ff46
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ private fun formatFileName(file: String): String = file

fun Routing.fetchRes() {
getOrPost("/get_record") {
val file = formatFileName( fetchGetOrThrow("file") )
val file = formatFileName( fetchOrThrow("file") )
val format = fetchOrThrow("out_format")
call.respondText(GetRecord(file, format), ContentType.Application.Json)
}

getOrPost("/get_file") {
val file = formatFileName( fetchGetOrThrow("file") )
val file = formatFileName( fetchOrThrow("file") )
val fileType = fetchOrThrow("file_type")
call.respondText(GetFile(file, fileType), ContentType.Application.Json)
}

getOrPost("/get_image") {
val file = formatFileName( fetchGetOrThrow("file") )
val file = formatFileName( fetchOrThrow("file") )
call.respondText(GetImage(file), ContentType.Application.Json)
}

Expand Down

0 comments on commit be9ff46

Please sign in to comment.