cn.leancloud.BeforeUpdateHookHandlerInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloud-function-sdk Show documentation
Show all versions of cloud-function-sdk Show documentation
leancloud leanengine cloud function library
package cn.leancloud;
import com.alibaba.fastjson.JSON;
import java.lang.reflect.Method;
import java.util.List;
import java.util.Map;
public class BeforeUpdateHookHandlerInfo extends EngineHookHandlerInfo {
public BeforeUpdateHookHandlerInfo(String endpoint, Method handlerMethod,
List params, Class returnType, String hookKey, String hookClass) {
super(endpoint, handlerMethod, params, returnType, hookKey, hookClass);
}
@Override
public Object wrapperResponse(Object result, String requestBody, boolean rpcCall) {
return JSON.parseObject(requestBody, Map.class).get("object");
}
}