mirror of
https://github.com/zitadel/zitadel.git
synced 2025-11-14 13:33:20 +00:00
fix: todos (#1346)
* fix: pub sub in new eventstore * fix: todos * fix: todos * fix: todos * fix: todos * fix: todos
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
package view
|
||||
|
||||
import (
|
||||
"github.com/caos/zitadel/internal/domain"
|
||||
caos_errs "github.com/caos/zitadel/internal/errors"
|
||||
key_model "github.com/caos/zitadel/internal/key/model"
|
||||
"github.com/caos/zitadel/internal/key/repository/view/model"
|
||||
global_model "github.com/caos/zitadel/internal/model"
|
||||
"github.com/caos/zitadel/internal/view/repository"
|
||||
"github.com/jinzhu/gorm"
|
||||
)
|
||||
@@ -12,8 +12,8 @@ import (
|
||||
func AuthNKeyByIDs(db *gorm.DB, table, objectID, keyID string) (*model.AuthNKeyView, error) {
|
||||
key := new(model.AuthNKeyView)
|
||||
query := repository.PrepareGetByQuery(table,
|
||||
model.AuthNKeySearchQuery{Key: key_model.AuthNKeyObjectID, Method: global_model.SearchMethodEquals, Value: objectID},
|
||||
model.AuthNKeySearchQuery{Key: key_model.AuthNKeyKeyID, Method: global_model.SearchMethodEquals, Value: keyID},
|
||||
model.AuthNKeySearchQuery{Key: key_model.AuthNKeyObjectID, Method: domain.SearchMethodEquals, Value: objectID},
|
||||
model.AuthNKeySearchQuery{Key: key_model.AuthNKeyKeyID, Method: domain.SearchMethodEquals, Value: keyID},
|
||||
)
|
||||
err := query(db, key)
|
||||
if caos_errs.IsNotFound(err) {
|
||||
@@ -38,7 +38,7 @@ func AuthNKeysByObjectID(db *gorm.DB, table string, objectID string) ([]*model.A
|
||||
{
|
||||
Key: key_model.AuthNKeyObjectID,
|
||||
Value: objectID,
|
||||
Method: global_model.SearchMethodEquals,
|
||||
Method: domain.SearchMethodEquals,
|
||||
},
|
||||
}
|
||||
query := repository.PrepareSearchQuery(table, model.AuthNKeySearchRequest{Queries: queries})
|
||||
@@ -52,7 +52,7 @@ func AuthNKeysByObjectID(db *gorm.DB, table string, objectID string) ([]*model.A
|
||||
func AuthNKeyByID(db *gorm.DB, table string, keyID string) (*model.AuthNKeyView, error) {
|
||||
key := new(model.AuthNKeyView)
|
||||
query := repository.PrepareGetByQuery(table,
|
||||
model.AuthNKeySearchQuery{Key: key_model.AuthNKeyKeyID, Method: global_model.SearchMethodEquals, Value: keyID},
|
||||
model.AuthNKeySearchQuery{Key: key_model.AuthNKeyKeyID, Method: domain.SearchMethodEquals, Value: keyID},
|
||||
)
|
||||
err := query(db, key)
|
||||
if caos_errs.IsNotFound(err) {
|
||||
|
||||
Reference in New Issue
Block a user