separate profile model from account model
This commit is contained in:
parent
f729160209
commit
c3271d7dcf
15 changed files with 152 additions and 83 deletions
|
|
@ -23,7 +23,7 @@ func (s *AccountStore) Get(id int) (*auth.Account, error) {
|
|||
a := auth.Account{ID: id}
|
||||
err := s.db.Model(&a).
|
||||
Where("account.id = ?id").
|
||||
Column("account.*", "Profile", "Token").
|
||||
Column("account.*", "Token").
|
||||
First()
|
||||
return &a, err
|
||||
}
|
||||
|
|
@ -67,9 +67,3 @@ func (s *AccountStore) DeleteToken(t *auth.Token) error {
|
|||
err := s.db.Delete(t)
|
||||
return err
|
||||
}
|
||||
|
||||
// UpdateProfile updates corresponding account profile.
|
||||
func (s *AccountStore) UpdateProfile(p *models.Profile) error {
|
||||
err := s.db.Update(p)
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue