Give the accumulator an invites table ptr

This commit is contained in:
David Robertson 2023-10-10 17:06:10 +01:00
parent 6fb24ad7b5
commit cd8390fe2f
No known key found for this signature in database
GPG Key ID: 903ECE108A39DEDD
2 changed files with 4 additions and 1 deletions

View File

@ -28,6 +28,7 @@ type Accumulator struct {
eventsTable *EventTable
snapshotTable *SnapshotTable
spacesTable *SpacesTable
invitesTable *InvitesTable
entityName string
}
@ -38,6 +39,7 @@ func NewAccumulator(db *sqlx.DB) *Accumulator {
eventsTable: NewEventTable(db),
snapshotTable: NewSnapshotsTable(db),
spacesTable: NewSpacesTable(db),
invitesTable: NewInvitesTable(db),
entityName: "server",
}
}

View File

@ -85,6 +85,7 @@ func NewStorageWithDB(db *sqlx.DB, addPrometheusMetrics bool) *Storage {
eventsTable: NewEventTable(db),
snapshotTable: NewSnapshotsTable(db),
spacesTable: NewSpacesTable(db),
invitesTable: NewInvitesTable(db),
entityName: "server",
}
@ -94,7 +95,7 @@ func NewStorageWithDB(db *sqlx.DB, addPrometheusMetrics bool) *Storage {
UnreadTable: NewUnreadTable(db),
EventsTable: acc.eventsTable,
AccountDataTable: NewAccountDataTable(db),
InvitesTable: NewInvitesTable(db),
InvitesTable: acc.invitesTable,
TransactionsTable: NewTransactionsTable(db),
DeviceDataTable: NewDeviceDataTable(db),
ReceiptTable: NewReceiptTable(db),