fixes lint issues
All checks were successful
gitea-deepak/gogmagog/pipeline/head This commit looks good
All checks were successful
gitea-deepak/gogmagog/pipeline/head This commit looks good
This commit is contained in:
parent
55c8c739b0
commit
c8e33884c0
@ -9,6 +9,8 @@ type User struct {
|
|||||||
Password []byte
|
Password []byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UserNoPassword contains the non password user fields.
|
||||||
|
// This is preferred outside of the model / store.
|
||||||
type UserNoPassword struct {
|
type UserNoPassword struct {
|
||||||
UserID int64 `json:"user_id"`
|
UserID int64 `json:"user_id"`
|
||||||
Username string `json:"username"`
|
Username string `json:"username"`
|
||||||
@ -24,6 +26,7 @@ func (m *Model) User(id int) (*UserNoPassword, error) {
|
|||||||
return user.NoPassword(), wrapNotFound(err)
|
return user.NoPassword(), wrapNotFound(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NoPassword strips the user of password.
|
||||||
func (u *User) NoPassword() *UserNoPassword {
|
func (u *User) NoPassword() *UserNoPassword {
|
||||||
return &UserNoPassword{
|
return &UserNoPassword{
|
||||||
UserID: u.UserID,
|
UserID: u.UserID,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user