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

added per-group and per-channel templates

This commit is contained in:
Fedor Katurov 2021-05-20 17:33:42 +07:00
parent a3fcb429ce
commit 3f2e07b391
5 changed files with 28 additions and 5 deletions

View file

@ -6,8 +6,18 @@ import { telegramConfigSchema } from "../service/telegram/validation";
import { loggerConfigSchema } from "../service/logger/config";
import { dbConfigValidatior } from "../service/db/postgres/validation";
const templateConfigSchema = object().shape({
export const templateConfigSchema = object().required().shape({
message_new: string().required(),
wall_post_new: string().required(),
group_join: string().required(),
group_leave: string().required(),
});
export const templateOptionalSchema = object().shape({
message_new: string(),
wall_post_new: string(),
group_join: string(),
group_leave: string(),
});
const configSchema = object<Config>().required().shape({