fixed a silly mistake that broke soundcloud
also added an error handler for this issue if it happens ever again
This commit is contained in:
@@ -73,7 +73,11 @@ if (fs.existsSync('./.env')) {
|
||||
res.status(j.status).json(j.body);
|
||||
} else {
|
||||
let j = apiJSON(3, { t: loc(languageCode(req), 'ErrorNoLink', process.env.selfURL) })
|
||||
res.status(j.status).json(j.body);
|
||||
if (!j === undefined && j.status && j.body) {
|
||||
res.status(j.status).json(j.body);
|
||||
} else {
|
||||
res.status(500).json({ 'status': 'error', 'text': loc(languageCode(req), 'ErrorUnknownStatus') })
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'stream':
|
||||
|
||||
Reference in New Issue
Block a user