mirror of
https://github.com/imputnet/cobalt.git
synced 2024-12-26 17:46:06 +00:00
api/url: return a diff error when youtube is disabled on main instance
This commit is contained in:
parent
f1916cef6e
commit
112866096c
|
@ -181,6 +181,11 @@ export function extract(url) {
|
|||
}
|
||||
|
||||
if (!env.enabledServices.has(host)) {
|
||||
// show a different message when youtube is disabled on official instances
|
||||
// as it only happens when shit hits the fan
|
||||
if (new URL(env.apiURL).hostname.endsWith(".imput.net") && host === "youtube") {
|
||||
return { error: "youtube.temporary_disabled" };
|
||||
}
|
||||
return { error: "service.disabled" };
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue