fixes lint issues
All checks were successful
gitea-deepak/gogmagog/pipeline/head This commit looks good

This commit is contained in:
Deepak Mallubhotla 2021-01-11 20:39:29 -06:00
parent 55c8c739b0
commit c8e33884c0
Signed by: deepak
GPG Key ID: 64BF53A3369104E7

View File

@ -9,6 +9,8 @@ type User struct {
Password []byte
}
// UserNoPassword contains the non password user fields.
// This is preferred outside of the model / store.
type UserNoPassword struct {
UserID int64 `json:"user_id"`
Username string `json:"username"`
@ -24,6 +26,7 @@ func (m *Model) User(id int) (*UserNoPassword, error) {
return user.NoPassword(), wrapNotFound(err)
}
// NoPassword strips the user of password.
func (u *User) NoPassword() *UserNoPassword {
return &UserNoPassword{
UserID: u.UserID,