1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2025-07-02 20:28:38 -04:00

Move users and securities to store

This commit is contained in:
2017-12-07 20:08:43 -05:00
parent c452984f23
commit bec5152e53
12 changed files with 255 additions and 185 deletions

View File

@ -31,6 +31,12 @@ func (tx *Tx) SessionExists(secret string) (bool, error) {
}
func (tx *Tx) DeleteSession(session *models.Session) error {
_, err := tx.Delete(session)
return err
count, err := tx.Delete(session)
if err != nil {
return err
}
if count != 1 {
return fmt.Errorf("Expected to delete 1 user, was going to delete %d", count)
}
return nil
}