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:
Dan Cech
2024-05-06 14:17:34 -04:00
committed by GitHub
parent ba8b4bde3a
commit 41bee274fd
27 changed files with 206 additions and 183 deletions
+1 -2
View File
@@ -103,8 +103,7 @@ func (hs *HTTPServer) AddOrgInvite(c *contextmodel.ReqContext) response.Response
namespace, identifier := c.SignedInUser.GetNamespacedID()
var userID int64
switch namespace {
case identity.NamespaceUser, identity.NamespaceServiceAccount:
if namespace == identity.NamespaceUser || namespace == identity.NamespaceServiceAccount {
var err error
userID, err = strconv.ParseInt(identifier, 10, 64)
if err != nil {