Skip to content

Commit ac49109

Browse files
author
EpicFn
committed
fix : Url 수정
1 parent ecad3b1 commit ac49109

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/org/tuna/zoopzoop/backend/global/clients/liveblocks/LiveblocksClient.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)