chore: WebSocket 演示地址切换为 wss://echo.websocket.org(含存量数据迁移)
This commit is contained in:
1 parent
f1911450d1
commit
2ff3f4270b
3 files changed
+12
-3
No files matched your search
@@ -148,6 +148,15 @@ function sanitizeCollections(collections: Collection[]): Collection[] {
|
||||
const fix = (nodes: CollectionNode[]): CollectionNode[] =>
|
||||
nodes.map((n) => {
|
||||
if (n.type === "folder") return { ...n, children: fix(n.children) };
|
||||
// 一次性迁移:旧演示地址更新为新的公共 echo 服务
|
||||
if (
|
||||
n.type === "request" &&
|
||||
n.kind === "websocket" &&
|
||||
n.data &&
|
||||
(n.data as { url?: string }).url === "wss://echo.websocket.events"
|
||||
) {
|
||||
(n.data as { url: string }).url = "wss://echo.websocket.org";
|
||||
}
|
||||
if (n.type === "request" && (!n.data || !n.kind)) {
|
||||
const kind = (n.kind ?? "http") as RequestKind;
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user