Chore: Fix error handling in postDashboard, remove UserDisplayDTO, fix live redis client initialization (#87206)
* clean up error handling in postDashboard and remove UserDisplayDTO * replace GetUserUID with GetUID and GetNamespacedUID, enforce namespace constant type * lint fix * lint fix * more lint fixes
This commit is contained in:
@@ -137,8 +137,8 @@ func (d *DashboardSnapshotStore) SearchDashboardSnapshots(ctx context.Context, q
|
||||
|
||||
namespace, id := query.SignedInUser.GetNamespacedID()
|
||||
var userID int64
|
||||
switch namespace {
|
||||
case identity.NamespaceServiceAccount, identity.NamespaceUser:
|
||||
|
||||
if namespace == identity.NamespaceServiceAccount || namespace == identity.NamespaceUser {
|
||||
var err error
|
||||
userID, err = identity.IntIdentifier(namespace, id)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user