@@ -23,7 +23,8 @@ public class LiveblocksClient {
2323 @ Value ("${liveblocks.secret-key}" )
2424 private String secretKey ;
2525
26- private static final String LIVEBLOCKS_API_URL = "https://api.liveblocks.io/v2/rooms?idempotent" ;
26+ private static final String LIVEBLOCKS_API_URL = "https://api.liveblocks.io/v2/rooms" ;
27+ private static final String LIVEBLOCKS_QUERY_STRING = "?idempotent" ;
2728 private static final String AUTH_API_URL = "https://api.liveblocks.io/v2/authorize-user" ;
2829
2930 /**
@@ -46,7 +47,7 @@ public void createRoom(String roomId) {
4647
4748 try {
4849 // 4. Liveblocks API에 POST 요청 전송
49- ResponseEntity <String > response = restTemplate .postForEntity (LIVEBLOCKS_API_URL , requestEntity , String .class );
50+ ResponseEntity <String > response = restTemplate .postForEntity (LIVEBLOCKS_API_URL + LIVEBLOCKS_QUERY_STRING , requestEntity , String .class );
5051
5152 if (response .getStatusCode ().is2xxSuccessful ()) {
5253 log .info ("Liveblocks room created successfully. roomId: {}" , roomId );
@@ -66,7 +67,7 @@ public void createRoom(String roomId) {
6667 * @param roomId 삭제할 방의 고유 ID
6768 */
6869 public void deleteRoom (String roomId ) {
69- String deleteUrl = LIVEBLOCKS_API_URL + "/" + roomId ;
70+ String deleteUrl = LIVEBLOCKS_API_URL + "/" + roomId + LIVEBLOCKS_QUERY_STRING ;
7071 HttpHeaders headers = new HttpHeaders ();
7172 headers .setBearerAuth (secretKey );
7273 HttpEntity <Void > requestEntity = new HttpEntity <>(headers );
0 commit comments