reghao преди 1 година
родител
ревизия
dd13a7aab9
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      oss-sdk/src/main/java/cn/reghao/oss/sdk/OssConsoleClient.java

+ 3 - 3
oss-sdk/src/main/java/cn/reghao/oss/sdk/OssConsoleClient.java

@@ -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);