Skip to content

Commit 9b0062a

Browse files
author
yangsen
committed
Merge branch 'master' of YangSen-qn:qiniu/java-sdk into resume-check-ctx-expire
2 parents d81fa09 + 701a4e3 commit 9b0062a

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/main/java/com/qiniu/rtc/model/AppParam.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
@Data
66
public class AppParam {
7+
private String appId;
78
private String hub;
89
private String title;
910
private int maxUsers;

src/main/java/com/qiniu/rtc/service/AppService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public Response deleteApp(String appId) throws QiniuException {
6262
* @throws QiniuException
6363
*/
6464
public Response updateApp(AppParam appParam) throws QiniuException {
65-
String urlPattern = "/v3/apps";
66-
return postCall(appParam, urlPattern);
65+
String urlPattern = "/v3/apps/%s";
66+
return postCall(appParam, urlPattern, appParam.getAppId());
6767
}
6868
}

src/test/java/test/com/qiniu/rtc/RtcTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ public static void initQRTC() throws QiniuException {
2929
client = QRTC.init(TestConfig.testAccessKey, TestConfig.testSecretKey, result.getResult().getAppId());
3030
}
3131

32-
3332
@Disabled
3433
@Test
3534
public void testApp() throws QiniuException {
@@ -41,6 +40,7 @@ public void testApp() throws QiniuException {
4140
AppParam appParam = new AppParam();
4241
appParam.setTitle("test_rtc_example");
4342
appParam.setMaxUsers(15);
43+
appParam.setAppId(result.getResult().getAppId());
4444
result = client.updateApp(appParam);
4545
assert result.getCode() == 200;
4646
}

0 commit comments

Comments
 (0)