From c8e81a3674da9c578b45837ffdc9a1aabd61ec2f Mon Sep 17 00:00:00 2001 From: Till Faelligen Date: Thu, 10 Feb 2022 13:44:58 +0100 Subject: [PATCH] Reuse type --- userapi/storage/accounts/postgres/storage.go | 2 +- userapi/storage/accounts/sqlite3/storage.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/userapi/storage/accounts/postgres/storage.go b/userapi/storage/accounts/postgres/storage.go index 24b60ac14..d31efd257 100644 --- a/userapi/storage/accounts/postgres/storage.go +++ b/userapi/storage/accounts/postgres/storage.go @@ -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 // account already exists, it will return nil, sqlutil.ErrUserExists. 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) { err = sqlutil.WithTransaction(d.db, func(txn *sql.Tx) error { // For guest accounts, we create a new numeric local part diff --git a/userapi/storage/accounts/sqlite3/storage.go b/userapi/storage/accounts/sqlite3/storage.go index 321b4ed51..0bab16ca3 100644 --- a/userapi/storage/accounts/sqlite3/storage.go +++ b/userapi/storage/accounts/sqlite3/storage.go @@ -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 // account already exists, it will return nil, ErrUserExists. 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) { // Create one account at a time else we can get 'database is locked'. d.profilesMu.Lock()