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:
parent
a78fc0bfe3
commit
a6e6209770
5 changed files with 38 additions and 12 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue