go-pg breaking change: use WherePK()
This commit is contained in:
parent
9b27282ee3
commit
489137b24e
1 changed files with 2 additions and 0 deletions
|
|
@ -33,6 +33,7 @@ func (s *AccountStore) Get(id int) (*pwdless.Account, error) {
|
||||||
func (s *AccountStore) Update(a *pwdless.Account) error {
|
func (s *AccountStore) Update(a *pwdless.Account) error {
|
||||||
_, err := s.db.Model(a).
|
_, err := s.db.Model(a).
|
||||||
Column("email", "name").
|
Column("email", "name").
|
||||||
|
WherePK().
|
||||||
Update()
|
Update()
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
@ -59,6 +60,7 @@ func (s *AccountStore) Delete(a *pwdless.Account) error {
|
||||||
func (s *AccountStore) UpdateToken(t *jwt.Token) error {
|
func (s *AccountStore) UpdateToken(t *jwt.Token) error {
|
||||||
_, err := s.db.Model(t).
|
_, err := s.db.Model(t).
|
||||||
Column("identifier").
|
Column("identifier").
|
||||||
|
WherePK().
|
||||||
Update()
|
Update()
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue