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

#4 added simple DB layer

This commit is contained in:
Fedor Katurov 2021-05-04 11:38:22 +07:00
parent f3a746efe8
commit c0588acd26
15 changed files with 476 additions and 11 deletions

View file

@ -4,6 +4,7 @@ import { Config } from "./types";
import { vkConfigSchema } from "../service/vk/validation";
import { telegramConfigSchema } from "../service/telegram/validation";
import { loggerConfigSchema } from "../service/logger/config";
import { dbConfigValidatior } from "../service/db/postgres/validation";
const templateConfigSchema = object().shape({
message_new: string().required(),
@ -15,6 +16,7 @@ const configSchema = object<Config>().required().shape({
telegram: telegramConfigSchema,
logger: loggerConfigSchema,
templates: templateConfigSchema,
postgres: dbConfigValidatior,
});
export const validateConfig = (config: Config) =>