Skip to content

Commit 3ccd967

Browse files
committed
解决远程函数拿不到有效的当前对象,导致校验参数容易放行等问题
1 parent b0e1010 commit 3ccd967

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

APIJSONORM/src/main/java/apijson/orm/AbstractObjectParser.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -774,12 +774,10 @@ public void onFunctionResponse(String type) throws Exception {
774774
//解析函数function
775775
Set<Entry<String, String>> functionSet = map == null ? null : map.entrySet();
776776
if (functionSet != null && functionSet.isEmpty() == false) {
777-
// JSONObject json = "-".equals(type) ? request : response; // key-():function 是实时执行,而不是在这里批量执行
777+
JSONObject json = "-".equals(type) ? request : response; // key-():function 是实时执行,而不是在这里批量执行
778778

779779
for (Entry<String, String> entry : functionSet) {
780-
781-
// parseFunction(json, entry.getKey(), entry.getValue());
782-
parseFunction(entry.getKey(), entry.getValue(), parentPath, name, response);
780+
parseFunction(entry.getKey(), entry.getValue(), parentPath, name, json);
783781
}
784782
}
785783
}

0 commit comments

Comments
 (0)