mirror of
https://github.com/whitechi73/OpenShamrock.git
synced 2024-08-14 05:12:17 +00:00
Compare commits
2 Commits
2db187e3d5
...
be9ff46134
Author | SHA1 | Date | |
---|---|---|---|
be9ff46134 | |||
1d6ac3e022 |
@ -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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user