mirror of
https://github.com/wukko/cobalt.git
synced 2025-01-22 10:46:19 +01:00
api/stream: rename getInternalStream to getInternalTunnel
This commit is contained in:
parent
5820736a31
commit
e7c2872e40
2 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue