Browse Source

Include user Id on the lookup api (#8698)

Implements feature request #8682
Denis Doria 8 years ago
parent
commit
5aac2d2078
2 changed files with 2 additions and 0 deletions
  1. 1 0
      pkg/api/user.go
  2. 1 0
      pkg/models/user.go

+ 1 - 0
pkg/api/user.go

@@ -42,6 +42,7 @@ func GetUserByLoginOrEmail(c *middleware.Context) Response {
 	}
 	user := query.Result
 	result := m.UserProfileDTO{
+		Id:             user.Id,
 		Name:           user.Name,
 		Email:          user.Email,
 		Login:          user.Login,

+ 1 - 0
pkg/models/user.go

@@ -163,6 +163,7 @@ type SignedInUser struct {
 }
 
 type UserProfileDTO struct {
+	Id             int64  `json:"id"`
 	Email          string `json:"email"`
 	Name           string `json:"name"`
 	Login          string `json:"login"`