mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 01:37:31 +00:00
fix: project by id loads project from view and from eventstore (#315)
This commit is contained in:
@@ -71,6 +71,14 @@ func (es *ProjectEventstore) ProjectByID(ctx context.Context, id string) (*proj_
|
||||
return model.ProjectToModel(project), nil
|
||||
}
|
||||
|
||||
func (es *ProjectEventstore) ProjectEventsByID(ctx context.Context, id string, sequence uint64) ([]*es_models.Event, error) {
|
||||
query, err := ProjectByIDQuery(id, sequence)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return es.FilterEvents(ctx, query)
|
||||
}
|
||||
|
||||
func (es *ProjectEventstore) CreateProject(ctx context.Context, project *proj_model.Project) (*proj_model.Project, error) {
|
||||
if !project.IsValid() {
|
||||
return nil, caos_errs.ThrowPreconditionFailed(nil, "EVENT-9dk45", "Errors.Project.Invalid")
|
||||
|
Reference in New Issue
Block a user