1624 - Return API Key on Password Change (#1663)

Updates the user model to return the user’s API key for easier administration.
pull/1671/head
Michael Eder 2019-11-16 19:18:03 +01:00 committed by Jordan Wright
parent e812ea0dfb
commit 1aab1a34ba
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ type User struct {
Id int64 `json:"id"` Id int64 `json:"id"`
Username string `json:"username" sql:"not null;unique"` Username string `json:"username" sql:"not null;unique"`
Hash string `json:"-"` Hash string `json:"-"`
ApiKey string `json:"-" sql:"not null;unique"` ApiKey string `json:"api_key" sql:"not null;unique"`
Role Role `json:"role" gorm:"association_autoupdate:false;association_autocreate:false"` Role Role `json:"role" gorm:"association_autoupdate:false;association_autocreate:false"`
RoleID int64 `json:"-"` RoleID int64 `json:"-"`
} }