Skip to content

Commit

Permalink
Added constants
Browse files Browse the repository at this point in the history
Signed-off-by: Aashir Siddiqui <[email protected]>
  • Loading branch information
aashir21 committed Nov 4, 2024
1 parent 1220b29 commit e9c2eda
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/usersformatter/summaryFormatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ const (
SUMMARY_FORMATTER_NAME = "summary"
)

const CLIENT_WEB_UI = "web-ui"
const CLIENT_REST_API = "rest-api"

type UserSummaryFormatter struct {
}

Expand Down Expand Up @@ -53,9 +56,9 @@ func (*UserSummaryFormatter) FormatUsers(users []galasaapi.UserData) (string, er

for _, client := range clients {
switch client.GetClientName() {
case "web-ui":
case CLIENT_WEB_UI:
webLastLogin = utils.FormatTimeToNearestDateTimeMins(client.GetLastLogin().String())
case "rest-api":
case CLIENT_REST_API:
restLastLogin = utils.FormatTimeToNearestDateTimeMins(client.GetLastLogin().String())
}
}
Expand Down

0 comments on commit e9c2eda

Please sign in to comment.