|
@@ -9,10 +9,7 @@ import com.qmth.ops.api.constants.OpsApiConstants;
|
|
|
import com.qmth.ops.api.dto.DeployForm;
|
|
|
import com.qmth.ops.api.security.AdminSession;
|
|
|
import com.qmth.ops.api.security.Permission;
|
|
|
-import com.qmth.ops.api.vo.CodeNameVO;
|
|
|
-import com.qmth.ops.api.vo.DeployVO;
|
|
|
-import com.qmth.ops.api.vo.OrgVO;
|
|
|
-import com.qmth.ops.api.vo.SuccessVO;
|
|
|
+import com.qmth.ops.api.vo.*;
|
|
|
import com.qmth.ops.biz.domain.AppDeploy;
|
|
|
import com.qmth.ops.biz.domain.Deploy;
|
|
|
import com.qmth.ops.biz.domain.DeployMode;
|
|
@@ -80,6 +77,13 @@ public class DeployController {
|
|
|
return new DeployVO(deployService.update(form.build()), appService);
|
|
|
}
|
|
|
|
|
|
+ @PostMapping("/secret")
|
|
|
+ public SecretVO getSecret(@RequestAttribute AdminSession adminSession, @RequestParam Long id) {
|
|
|
+ adminSession.hasPermission(Permission.DEPLOY_SECRET_VIEW, id);
|
|
|
+ Deploy deploy = deployService.findById(id);
|
|
|
+ return new SecretVO(deploy.getAccessKey(), deploy.getAccessSecret());
|
|
|
+ }
|
|
|
+
|
|
|
@PostMapping("/device/save")
|
|
|
public Object saveDevice(@RequestAttribute AdminSession adminSession, @RequestParam Long id,
|
|
|
@RequestParam MultipartFile deviceInfo, @RequestParam(required = false) String remark) throws Exception {
|