mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-22 11:41:38 +00:00
Use db writer on sqlite account table (#1944)
This commit is contained in:
parent
32538640db
commit
a060df91e2
@ -160,8 +160,9 @@ func (d *Database) SetPassword(
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
err = d.accounts.updatePassword(ctx, localpart, hash)
|
return d.writer.Do(nil, nil, func(txn *sql.Tx) error {
|
||||||
return err
|
return d.accounts.updatePassword(ctx, localpart, hash)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateGuestAccount makes a new guest account and creates an empty profile
|
// CreateGuestAccount makes a new guest account and creates an empty profile
|
||||||
@ -388,7 +389,9 @@ func (d *Database) SearchProfiles(ctx context.Context, searchString string, limi
|
|||||||
|
|
||||||
// DeactivateAccount deactivates the user's account, removing all ability for the user to login again.
|
// DeactivateAccount deactivates the user's account, removing all ability for the user to login again.
|
||||||
func (d *Database) DeactivateAccount(ctx context.Context, localpart string) (err error) {
|
func (d *Database) DeactivateAccount(ctx context.Context, localpart string) (err error) {
|
||||||
return d.accounts.deactivateAccount(ctx, localpart)
|
return d.writer.Do(nil, nil, func(txn *sql.Tx) error {
|
||||||
|
return d.accounts.deactivateAccount(ctx, localpart)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateOpenIDToken persists a new token that was issued for OpenID Connect
|
// CreateOpenIDToken persists a new token that was issued for OpenID Connect
|
||||||
|
Loading…
Reference in New Issue
Block a user