add support for installing external APK

This commit is contained in:
Aria Moradi
2021-09-09 05:22:23 +04:30
parent ae7d975a92
commit 090399f61d
8 changed files with 45 additions and 14 deletions

View File

@@ -33,6 +33,19 @@ object ExtensionController {
)
}
/** install the uploaded apk file */
fun installFile(ctx: Context) {
val uploadedFile = ctx.uploadedFile("file")!!
println(uploadedFile.filename)
ctx.json(
future {
Extension.installExternalExtension(uploadedFile.content)
}
)
}
/** update extension identified with "pkgName" */
fun update(ctx: Context) {
val pkgName = ctx.pathParam("pkgName")