api/config: apply friendly name in a map

filter doesn't allow changing the value
This commit is contained in:
wukko 2024-09-01 15:56:51 +06:00
parent c71ed59660
commit 805e5d42c0
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -7,8 +7,10 @@ const version = await getVersion();
const disabledServices = process.env.DISABLED_SERVICES?.split(',') || [];
const enabledServices = new Set(Object.keys(services).filter(e => {
if (!disabledServices.includes(e)) {
return friendlyServiceName(e);
return e;
}
}).map(e => {
return friendlyServiceName(e);
}));
const env = {