go-pg breaking change: use WherePK()

This commit is contained in:
dhax 2019-01-01 19:58:31 +01:00
parent 9b27282ee3
commit 489137b24e

View file

@ -33,6 +33,7 @@ func (s *AccountStore) Get(id int) (*pwdless.Account, error) {
func (s *AccountStore) Update(a *pwdless.Account) error {
_, err := s.db.Model(a).
Column("email", "name").
WherePK().
Update()
return err
}
@ -59,6 +60,7 @@ func (s *AccountStore) Delete(a *pwdless.Account) error {
func (s *AccountStore) UpdateToken(t *jwt.Token) error {
_, err := s.db.Model(t).
Column("identifier").
WherePK().
Update()
return err
}