From e7c2872e402a036a336e3a3490de3fbe19c72696 Mon Sep 17 00:00:00 2001 From: jj Date: Mon, 16 Dec 2024 10:16:48 +0000 Subject: [PATCH] api/stream: rename getInternalStream to getInternalTunnel --- api/src/core/api.js | 4 ++-- api/src/stream/manage.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/src/core/api.js b/api/src/core/api.js index 153f2ca6..76a0f95f 100644 --- a/api/src/core/api.js +++ b/api/src/core/api.js @@ -16,7 +16,7 @@ import { createStore } from "../store/redis-ratelimit.js"; import { randomizeCiphers } from "../misc/randomize-ciphers.js"; import { verifyTurnstileToken } from "../security/turnstile.js"; import { friendlyServiceName } from "../processing/service-alias.js"; -import { verifyStream, getInternalStream } from "../stream/manage.js"; +import { verifyStream, getInternalTunnel } from "../stream/manage.js"; import { createResponse, normalizeRequest, getIP } from "../processing/request.js"; import * as APIKeys from "../security/api-keys.js"; import * as Cookies from "../processing/cookie/manager.js"; @@ -303,7 +303,7 @@ export const runAPI = async (express, app, __dirname, isPrimary = true) => { return res.sendStatus(400); } - const streamInfo = getInternalStream(req.query.id); + const streamInfo = getInternalTunnel(req.query.id); if (!streamInfo) { return res.sendStatus(404); } diff --git a/api/src/stream/manage.js b/api/src/stream/manage.js index 79b5c1db..a090ca22 100644 --- a/api/src/stream/manage.js +++ b/api/src/stream/manage.js @@ -68,7 +68,7 @@ export function createStream(obj) { return streamLink.toString(); } -export function getInternalStream(id) { +export function getInternalTunnel(id) { return internalStreamCache.get(id); } @@ -124,7 +124,7 @@ export function destroyInternalStream(url) { const id = url.searchParams.get('id'); if (internalStreamCache.has(id)) { - closeRequest(getInternalStream(id)?.controller); + closeRequest(getInternalTunnel(id)?.controller); internalStreamCache.delete(id); } }