mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-31 02:33:09 -06:00
Reuse type
This commit is contained in:
parent
d8e2a0a67f
commit
c8e81a3674
|
|
@ -161,7 +161,7 @@ func (d *Database) SetPassword(
|
||||||
// for this account. If no password is supplied, the account will be a passwordless account. If the
|
// for this account. If no password is supplied, the account will be a passwordless account. If the
|
||||||
// account already exists, it will return nil, sqlutil.ErrUserExists.
|
// account already exists, it will return nil, sqlutil.ErrUserExists.
|
||||||
func (d *Database) CreateAccount(
|
func (d *Database) CreateAccount(
|
||||||
ctx context.Context, localpart string, plaintextPassword string, appserviceID string, accountType api.AccountType,
|
ctx context.Context, localpart, plaintextPassword, appserviceID string, accountType api.AccountType,
|
||||||
) (acc *api.Account, err error) {
|
) (acc *api.Account, err error) {
|
||||||
err = sqlutil.WithTransaction(d.db, func(txn *sql.Tx) error {
|
err = sqlutil.WithTransaction(d.db, func(txn *sql.Tx) error {
|
||||||
// For guest accounts, we create a new numeric local part
|
// For guest accounts, we create a new numeric local part
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@ func (d *Database) SetPassword(
|
||||||
// for this account. If no password is supplied, the account will be a passwordless account. If the
|
// for this account. If no password is supplied, the account will be a passwordless account. If the
|
||||||
// account already exists, it will return nil, ErrUserExists.
|
// account already exists, it will return nil, ErrUserExists.
|
||||||
func (d *Database) CreateAccount(
|
func (d *Database) CreateAccount(
|
||||||
ctx context.Context, localpart string, plaintextPassword string, appserviceID string, accountType api.AccountType,
|
ctx context.Context, localpart, plaintextPassword, appserviceID string, accountType api.AccountType,
|
||||||
) (acc *api.Account, err error) {
|
) (acc *api.Account, err error) {
|
||||||
// Create one account at a time else we can get 'database is locked'.
|
// Create one account at a time else we can get 'database is locked'.
|
||||||
d.profilesMu.Lock()
|
d.profilesMu.Lock()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue