throw exception for nonexistent languages in VOA
This commit is contained in:
parent
30ff4ff172
commit
d1fb755da6
|
|
@ -13,6 +13,8 @@ module.exports = async (ctx) => {
|
|||
case 'tibetan':
|
||||
baseURL = 'https://www.voatibetan.com/';
|
||||
break;
|
||||
default:
|
||||
throw Error('The language specified does not exist');
|
||||
}
|
||||
|
||||
const response = await got.get(baseURL + 'api/' + ctx.params.channel || '');
|
||||
|
|
|
|||
Loading…
Reference in New Issue