mirror of
https://github.com/imputnet/cobalt.git
synced 2025-01-01 12:46:07 +00:00
api/core: move friendly name map to server info
This commit is contained in:
parent
805e5d42c0
commit
d9925f2233
|
@ -1,6 +1,5 @@
|
||||||
import { getVersion } from "@imput/version-info";
|
import { getVersion } from "@imput/version-info";
|
||||||
import { services } from "./processing/service-config.js";
|
import { services } from "./processing/service-config.js";
|
||||||
import { friendlyServiceName } from "./processing/service-alias.js";
|
|
||||||
|
|
||||||
const version = await getVersion();
|
const version = await getVersion();
|
||||||
|
|
||||||
|
@ -9,8 +8,6 @@ const enabledServices = new Set(Object.keys(services).filter(e => {
|
||||||
if (!disabledServices.includes(e)) {
|
if (!disabledServices.includes(e)) {
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
}).map(e => {
|
|
||||||
return friendlyServiceName(e);
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const env = {
|
const env = {
|
||||||
|
|
|
@ -14,6 +14,7 @@ import { Bright, Cyan } from "../misc/console-text.js";
|
||||||
import { generateHmac, generateSalt } from "../misc/crypto.js";
|
import { generateHmac, generateSalt } from "../misc/crypto.js";
|
||||||
import { randomizeCiphers } from "../misc/randomize-ciphers.js";
|
import { randomizeCiphers } from "../misc/randomize-ciphers.js";
|
||||||
import { verifyTurnstileToken } from "../security/turnstile.js";
|
import { verifyTurnstileToken } from "../security/turnstile.js";
|
||||||
|
import { friendlyServiceName } from "../processing/service-alias.js";
|
||||||
import { verifyStream, getInternalStream } from "../stream/manage.js";
|
import { verifyStream, getInternalStream } from "../stream/manage.js";
|
||||||
import { createResponse, normalizeRequest, getIP } from "../processing/request.js";
|
import { createResponse, normalizeRequest, getIP } from "../processing/request.js";
|
||||||
|
|
||||||
|
@ -48,7 +49,9 @@ export const runAPI = (express, app, __dirname) => {
|
||||||
url: env.apiURL,
|
url: env.apiURL,
|
||||||
startTime: `${startTimestamp}`,
|
startTime: `${startTimestamp}`,
|
||||||
durationLimit: env.durationLimit,
|
durationLimit: env.durationLimit,
|
||||||
services: [...env.enabledServices],
|
services: [...env.enabledServices].map(e => {
|
||||||
|
return friendlyServiceName(e);
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
git,
|
git,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue