feat: config 字段改为可选,只传 script 即可提交纯Groovy适配
This commit is contained in:
@@ -154,8 +154,11 @@ public class ConfigController {
|
||||
String schemaVersion = (String) payload.get("schemaVersion");
|
||||
String groovyScript = (String) payload.get("script");
|
||||
|
||||
if (version == null || configJson == null) {
|
||||
return ApiResponse.error(400, "version and config are required");
|
||||
if (version == null) {
|
||||
return ApiResponse.error(400, "version is required");
|
||||
}
|
||||
if ((configJson == null || configJson.isBlank()) && (groovyScript == null || groovyScript.isBlank())) {
|
||||
return ApiResponse.error(400, "config 或 script 至少需要一个");
|
||||
}
|
||||
|
||||
Long submitterId = (Long) request.getAttribute("accountId");
|
||||
|
||||
Reference in New Issue
Block a user