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:
parent
969103d111
commit
96fea09b3f
3 changed files with 10 additions and 3 deletions
src/config
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue