mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 03:57:32 +00:00
fix: use current sequence for refetching of events (#5772)
* fix: use current sequence for refetching of events * fix: use client ids
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
package view
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/jinzhu/gorm"
|
||||
|
||||
"github.com/zitadel/zitadel/internal/api/call"
|
||||
"github.com/zitadel/zitadel/internal/crypto"
|
||||
"github.com/zitadel/zitadel/internal/database"
|
||||
eventstore "github.com/zitadel/zitadel/internal/eventstore/v1"
|
||||
@@ -16,6 +19,7 @@ type View struct {
|
||||
idGenerator id.Generator
|
||||
query *query.Queries
|
||||
es eventstore.Eventstore
|
||||
client *database.DB
|
||||
}
|
||||
|
||||
func StartView(sqlClient *database.DB, keyAlgorithm crypto.EncryptionAlgorithm, queries *query.Queries, idGenerator id.Generator, es eventstore.Eventstore) (*View, error) {
|
||||
@@ -29,9 +33,14 @@ func StartView(sqlClient *database.DB, keyAlgorithm crypto.EncryptionAlgorithm,
|
||||
idGenerator: idGenerator,
|
||||
query: queries,
|
||||
es: es,
|
||||
client: sqlClient,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (v *View) Health() (err error) {
|
||||
return v.Db.DB().Ping()
|
||||
}
|
||||
|
||||
func (v *View) TimeTravel(ctx context.Context, tableName string) string {
|
||||
return tableName + v.client.Timetravel(call.Took(ctx))
|
||||
}
|
||||
|
Reference in New Issue
Block a user