test-stand-fix: секреты для теста больше не нужно костылить, нужный урл для вебсокетов в контуре
This commit is contained in:
parent
5cc07c7704
commit
75fa232bc6
@ -4,10 +4,7 @@ from typing import List
|
||||
from pydantic import AliasChoices, Field
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
if os.environ.get("APP_ENV", "dev") == "test":
|
||||
prefix = "OPENBAO__SETTINGS_TEST"
|
||||
else:
|
||||
prefix = "OPENBAO__SETTINGS"
|
||||
prefix = "OPENBAO__SETTINGS"
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
|
||||
@ -27,9 +27,8 @@ export const RealtimeProvider = ({
|
||||
direction,
|
||||
userId,
|
||||
}) => {
|
||||
// Формируем URL
|
||||
const wsUrl = `${process.env.REACT_APP_WS_URL || "ws://localhost:8000"}/api/v1/ws/form/${formId}/sheet/${sheetName}${direction ? `?direction=${direction}` : ""}`;
|
||||
|
||||
// Формируем URL (кастомные секреты на фронте пока недоступны, делаем через REACT_APP_ROOT_PATH)
|
||||
const wsUrl = `${(process.env.REACT_APP_API_URL || process.env.REACT_APP_API_URL || process.env.REACT_APP_ROOT_PATH || "ws://localhost:8000").replace(/^http/, "ws")}/api/v1/ws/form/${formId}/sheet/${sheetName}${direction ? `?direction=${direction}` : ""}`; console.log()
|
||||
const handleMessage = useCallback((data) => {
|
||||
// Обработка ошибок
|
||||
if (data.error) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user