From d9925f2233fbd1d86ac957f1f099723c595bbff9 Mon Sep 17 00:00:00 2001 From: wukko Date: Sun, 1 Sep 2024 16:02:06 +0600 Subject: [PATCH] api/core: move friendly name map to server info --- api/src/config.js | 3 --- api/src/core/api.js | 5 ++++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/src/config.js b/api/src/config.js index d1faf0c7..fc1d5d29 100644 --- a/api/src/config.js +++ b/api/src/config.js @@ -1,6 +1,5 @@ import { getVersion } from "@imput/version-info"; import { services } from "./processing/service-config.js"; -import { friendlyServiceName } from "./processing/service-alias.js"; const version = await getVersion(); @@ -9,8 +8,6 @@ const enabledServices = new Set(Object.keys(services).filter(e => { if (!disabledServices.includes(e)) { return e; } -}).map(e => { - return friendlyServiceName(e); })); const env = { diff --git a/api/src/core/api.js b/api/src/core/api.js index 37c33bd9..4eb7c7ff 100644 --- a/api/src/core/api.js +++ b/api/src/core/api.js @@ -14,6 +14,7 @@ import { Bright, Cyan } from "../misc/console-text.js"; import { generateHmac, generateSalt } from "../misc/crypto.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 { createResponse, normalizeRequest, getIP } from "../processing/request.js"; @@ -48,7 +49,9 @@ export const runAPI = (express, app, __dirname) => { url: env.apiURL, startTime: `${startTimestamp}`, durationLimit: env.durationLimit, - services: [...env.enabledServices], + services: [...env.enabledServices].map(e => { + return friendlyServiceName(e); + }), }, git, })