summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhangshuai <[email protected]>2024-11-01 15:08:56 +0800
committerzhangshuai <[email protected]>2024-11-01 15:08:56 +0800
commitf90a6deffb946b93f7336aed335b95d4101ce204 (patch)
tree9f554c90c043ceacad00fdd2a4b39fb40a4b0361
parentad63b414bf332a5bc9a2cd6b2b1217423401b089 (diff)
fix: 调整 playbook 接口参数名称
-rw-r--r--src/main/java/net/geedge/api/controller/APIController.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/net/geedge/api/controller/APIController.java b/src/main/java/net/geedge/api/controller/APIController.java
index 1ecc64f..75e3bc0 100644
--- a/src/main/java/net/geedge/api/controller/APIController.java
+++ b/src/main/java/net/geedge/api/controller/APIController.java
@@ -257,7 +257,7 @@ public class APIController {
}
@PostMapping("/playbook")
- public R execPlaybook(@RequestParam("files") MultipartFile file,
+ public R execPlaybook(@RequestParam("file") MultipartFile file,
@RequestParam("packageName") String packageName,
@RequestParam("id") String id) {
File apkFile = null;
@@ -317,6 +317,9 @@ public class APIController {
throw new APIException(RCode.BAD_REQUEST);
}
Map result = Constant.PLAYBOOK_RUN_RESULT.get(id);
+ if (!T.MapUtil.getStr(result, "status").equals("running")){
+ Constant.PLAYBOOK_RUN_RESULT.remove(id);
+ }
return R.ok().putData(result);
}