Skip to content

Commit

Permalink
Pass in bool to MakeUserView instead of user
Browse files Browse the repository at this point in the history
  • Loading branch information
acgaudette committed Oct 8, 2017
1 parent cc9f228 commit 5b8c4e5
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/control/user.go
Expand Up @@ -11,7 +11,7 @@ import (
*/

// Build a User view
func MakeUserView(user data.User, active data.User) *views.User {
func MakeUserView(user data.User, isActive bool) *views.User {
handle := user.Handle()

// Always display something to the frontend
Expand All @@ -26,13 +26,6 @@ func MakeUserView(user data.User, active data.User) *views.User {
name = "Name Invalid"
}

// Compare the active user to the input user
isActive := false

if active != nil && active.Handle() == user.Handle() {
isActive = true
}

view := &views.User{
Handle: handle,
Name: name,
Expand Down

0 comments on commit 5b8c4e5

Please sign in to comment.