Skip to content

Commit

Permalink
Merge pull request #559 from QN-zhangzhuo/QRTC-1984
Browse files Browse the repository at this point in the history
QRTC-1984  rtc v3 update app bug fix
  • Loading branch information
bachue authored Oct 24, 2022
2 parents ae2a7af + eaa24be commit 90e14da
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/main/java/com/qiniu/rtc/model/AppParam.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

@Data
public class AppParam {
private String appId;
private String hub;
private String title;
private int maxUsers;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/qiniu/rtc/service/AppService.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public Response deleteApp(String appId) throws QiniuException {
* @throws QiniuException
*/
public Response updateApp(AppParam appParam) throws QiniuException {
String urlPattern = "/v3/apps";
return postCall(appParam, urlPattern);
String urlPattern = "/v3/apps/%s";
return postCall(appParam, urlPattern, appParam.getAppId());
}
}
2 changes: 1 addition & 1 deletion src/test/java/test/com/qiniu/rtc/RtcTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public static void initQRTC() throws QiniuException {
client = QRTC.init(TestConfig.testAccessKey, TestConfig.testSecretKey, result.getResult().getAppId());
}


@Disabled
@Test
public void testApp() throws QiniuException {
Expand All @@ -41,6 +40,7 @@ public void testApp() throws QiniuException {
AppParam appParam = new AppParam();
appParam.setTitle("test_rtc_example");
appParam.setMaxUsers(15);
appParam.setAppId(result.getResult().getAppId());
result = client.updateApp(appParam);
assert result.getCode() == 200;
}
Expand Down

0 comments on commit 90e14da

Please sign in to comment.