删除无用代码
This commit is contained in:
@@ -309,18 +309,4 @@ object BookController {
|
|||||||
return returnData.setData(data)
|
return returnData.setData(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取图片
|
|
||||||
*/
|
|
||||||
fun getImage(parameters: Map<String, List<String>>): ReturnData {
|
|
||||||
val returnData = ReturnData()
|
|
||||||
val coverPath = parameters["path"]?.firstOrNull()
|
|
||||||
val ftBitmap = ImageLoader.loadBitmap(appCtx, coverPath).submit()
|
|
||||||
return try {
|
|
||||||
returnData.setData(ftBitmap.get())
|
|
||||||
} catch (e: Exception) {
|
|
||||||
returnData.setData(BookCover.defaultDrawable.toBitmap())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ class HttpServer(port: Int) : NanoHTTPD(port) {
|
|||||||
"/getReadConfig" -> BookController.getWebReadConfig()
|
"/getReadConfig" -> BookController.getWebReadConfig()
|
||||||
"/getRssSource" -> RssSourceController.getSource(parameters)
|
"/getRssSource" -> RssSourceController.getSource(parameters)
|
||||||
"/getRssSources" -> RssSourceController.sources
|
"/getRssSources" -> RssSourceController.sources
|
||||||
"/getImage" -> BookController.getImage(parameters)
|
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user