Skip to content

Commit cc9b361

Browse files
author
arolave
committed
make AccountsServer more extensible
1 parent 9597a25 commit cc9b361

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/server/src/accounts-server.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ export class AccountsServer {
344344
throw new AccountsError('User not found');
345345
}
346346

347-
const impersonatedUser = await this.db.findUserByUsername(username);
347+
const impersonatedUser = await this.findUserByUsername(username);
348348
if (!impersonatedUser) {
349349
throw new AccountsError(`User ${username} not found`);
350350
}
@@ -772,7 +772,7 @@ export class AccountsServer {
772772
* @returns {Promise<void>} - Return a Promise.
773773
*/
774774
public async sendVerificationEmail(address: string): Promise<void> {
775-
const user = await this.db.findUserByEmail(address);
775+
const user = await this.findUserByEmail(address);
776776
if (!user) {
777777
throw new AccountsError('User not found', { email: address });
778778
}
@@ -809,7 +809,7 @@ export class AccountsServer {
809809
* @returns {Promise<void>} - Return a Promise.
810810
*/
811811
public async sendResetPasswordEmail(address: string): Promise<void> {
812-
const user = await this.db.findUserByEmail(address);
812+
const user = await this.findUserByEmail(address);
813813
if (!user) {
814814
throw new AccountsError('User not found', { email: address });
815815
}
@@ -837,7 +837,7 @@ export class AccountsServer {
837837
* @returns {Promise<void>} - Return a Promise.
838838
*/
839839
public async sendEnrollmentEmail(address: string): Promise<void> {
840-
const user = await this.db.findUserByEmail(address);
840+
const user = await this.findUserByEmail(address);
841841
if (!user) {
842842
throw new AccountsError('User not found', { email: address });
843843
}

0 commit comments

Comments
 (0)