1
0
Fork 0
mirror of https://github.com/muerwre/vk-tg-bot.git synced 2025-05-10 06:06:41 +07:00

fix some startup problems

This commit is contained in:
Fedor Katurov 2025-02-24 19:48:12 +07:00
parent 969103d111
commit 96fea09b3f
3 changed files with 10 additions and 3 deletions
src/config

View file

@ -30,8 +30,11 @@ export default function prepareConfig() {
const key = JSON.parse(
fs.readFileSync(config.calendar?.keyFile).toString()
) as CalendarKeyFile;
calendarKeyValidator.validateSync(key);
config.calendarKey = key;
if (key) {
calendarKeyValidator.validateSync(key);
config.calendarKey = key;
}
} catch (error) {
console.warn("tried to parse calendar key, got error", error);
}