Update chat room input fields to clear default values and change socket connection to production URL
This commit is contained in:
@@ -39,9 +39,9 @@
|
||||
|
||||
<h2>Chat Room</h2>
|
||||
<div>
|
||||
<label>User ID: <input type="text" id="userId" value="1" /></label>
|
||||
<label>Receiver ID: <input type="text" id="receiverId" value="2" /></label>
|
||||
<label>Chat ID: <input type="text" id="chatId" value="chat123" /></label>
|
||||
<label>User ID: <input type="text" id="userId" value="" /></label>
|
||||
<label>Receiver ID: <input type="text" id="receiverId" value="" /></label>
|
||||
<label>Chat ID: <input type="text" id="chatId" value="" /></label>
|
||||
<button onclick="joinRoom()">Join Chat Room</button>
|
||||
</div>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<button onclick="sendMessage()">Send</button>
|
||||
|
||||
<script>
|
||||
const socket = io("http://localhost:8000");
|
||||
const socket = io("https://ssachat.betadelivery.com");
|
||||
|
||||
let chatId = '';
|
||||
let userId = '';
|
||||
@@ -82,7 +82,7 @@
|
||||
const messageText = document.getElementById("message").value;
|
||||
if (!messageText) return;
|
||||
|
||||
const response = await fetch("http://localhost:8000/api/chat/user/send-message", {
|
||||
const response = await fetch("https://ssachat.betadelivery.com/api/chat/user/send-message", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({
|
||||
|
||||
Reference in New Issue
Block a user