0
0
Fork 0

Add safety check for getting data from a non-set up channel

This commit is contained in:
Oliver-Akins 2023-09-03 11:15:36 -06:00
parent 0db0ee18ae
commit fe91f856fe

View file

@ -23,6 +23,9 @@ const route: ServerRoute = {
const { word_list } = request.query;
let data = await database.getChannel(channel);
if (data == null) {
throw boom.badRequest(`Couldn't find the requested channel's information, make sure to register it`);
};
if (config.game.files[word_list] == null) {