api/core: move friendly name map to server info

This commit is contained in:
wukko 2024-09-01 16:02:06 +06:00
parent 805e5d42c0
commit d9925f2233
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2
2 changed files with 4 additions and 4 deletions

View file

@ -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 = {

View file

@ -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,
})