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

#4 storing events in db

This commit is contained in:
Fedor Katurov 2021-05-05 12:14:31 +07:00
parent a78fc0bfe3
commit a6e6209770
5 changed files with 38 additions and 12 deletions

View file

@ -47,7 +47,8 @@ export class PostgresDB implements Storage {
eventId: number,
groupId: number,
channel: string,
tgMessageId: number
tgMessageId: number,
text: Record<any, any>
) => {
const event = this.events.create({
type,
@ -55,6 +56,7 @@ export class PostgresDB implements Storage {
groupId,
channel,
tgMessageId,
text,
});
return await this.events.save(event);