Requester: Remove duplicated function (#97038)

* Remove duplicated function

* Remove GetDisplayName from interface

* Use GetName
This commit is contained in:
Karl Persson
2024-11-26 15:29:31 +01:00
committed by GitHub
parent 6d04023aa6
commit 76f052e8de
12 changed files with 26 additions and 69 deletions
+2 -2
View File
@@ -262,7 +262,7 @@ func (s *ServiceImpl) addHelpLinks(treeRoot *navtree.NavTreeRoot, c *contextmode
func (s *ServiceImpl) getProfileNode(c *contextmodel.ReqContext) *navtree.NavLink {
// Only set login if it's different from the name
var login string
if c.SignedInUser.GetLogin() != c.SignedInUser.GetDisplayName() {
if c.SignedInUser.GetLogin() != c.SignedInUser.GetName() {
login = c.SignedInUser.GetLogin()
}
gravatarURL := dtos.GetGravatarUrl(s.cfg, c.SignedInUser.GetEmail())
@@ -297,7 +297,7 @@ func (s *ServiceImpl) getProfileNode(c *contextmodel.ReqContext) *navtree.NavLin
}
return &navtree.NavLink{
Text: c.SignedInUser.GetDisplayName(),
Text: c.SignedInUser.GetName(),
SubTitle: login,
Id: "profile",
Img: gravatarURL,