format code

This commit is contained in:
anovazzi1 2023-08-15 15:40:50 -03:00
commit 021380b6f3
2 changed files with 3 additions and 2 deletions

View file

@ -160,7 +160,8 @@ export default function FormModal({
} }
function getWebSocketUrl(chatId, isDevelopment = false) { function getWebSocketUrl(chatId, isDevelopment = false) {
const isSecureProtocol = window.location.protocol === "https:" || window.location.port === "443"; const isSecureProtocol =
window.location.protocol === "https:" || window.location.port === "443";
const webSocketProtocol = isSecureProtocol ? "wss" : "ws"; const webSocketProtocol = isSecureProtocol ? "wss" : "ws";
const host = isDevelopment ? "localhost:7860" : window.location.host; const host = isDevelopment ? "localhost:7860" : window.location.host;
const chatEndpoint = `/api/v1/chat/${chatId}`; const chatEndpoint = `/api/v1/chat/${chatId}`;