Set ID on retrieved user from boltdb
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>pull/2114/head
parent
7f4af358ae
commit
4761f4454c
|
@ -414,6 +414,7 @@ func MarshalUser(u *chronograf.User) ([]byte, error) {
|
|||
roles[i] = role.Name
|
||||
}
|
||||
return MarshalUserPB(&User{
|
||||
ID: u.ID,
|
||||
Name: u.Name,
|
||||
Provider: u.Provider,
|
||||
Scheme: u.Scheme,
|
||||
|
|
|
@ -69,6 +69,7 @@ func (s *UsersStore) Add(ctx context.Context, u *chronograf.User) (*chronograf.U
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
u.ID = seq
|
||||
if v, err := internal.MarshalUser(u); err != nil {
|
||||
return err
|
||||
} else if err := b.Put(u64tob(seq), v); err != nil {
|
||||
|
|
Loading…
Reference in New Issue