mirror of
https://github.com/imputnet/cobalt.git
synced 2025-12-14 12:15:21 +00:00
api: move service disabling to DISABLED_SERVICES env
This commit is contained in:
@@ -203,8 +203,8 @@ export const runAPI = (express, app, __dirname) => {
|
||||
}
|
||||
|
||||
const parsed = extract(normalizedRequest.url);
|
||||
if (parsed === null) {
|
||||
return fail(res, "error.api.service.unsupported");
|
||||
if ("error" in parsed) {
|
||||
return fail(res, `error.api.service.${parsed.error}`);
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user