|
|
@@ -102,7 +102,7 @@ public class OssConsoleClient {
|
|
|
return webResult.getData();
|
|
|
}
|
|
|
|
|
|
- public ObjectInfo getChannelScope(int channelId) throws Exception {
|
|
|
+ public Integer getChannelScope(int channelId) throws Exception {
|
|
|
String api = String.format("%s/api/oss/channel/scope?channelId=%s", endpoint, channelId);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.header("authorization", "Bearer " + token)
|
|
|
@@ -117,8 +117,8 @@ public class OssConsoleClient {
|
|
|
throw new Exception(errMsg);
|
|
|
}
|
|
|
|
|
|
- Type type = new TypeToken<WebResult<ObjectInfo>>(){}.getType();
|
|
|
- WebResult<ObjectInfo> webResult = JsonConverter.jsonToObject(body, type);
|
|
|
+ Type type = new TypeToken<WebResult<Integer>>(){}.getType();
|
|
|
+ WebResult<Integer> webResult = JsonConverter.jsonToObject(body, type);
|
|
|
if (webResult.getCode() != 0) {
|
|
|
String errMsg = String.format("%s - %s", webResult.getCode(), webResult.getMsg());
|
|
|
throw new Exception(errMsg);
|