Skip to content

Commit a8e0626

Browse files
authored
Merge pull request #115 from sloops77/extensible
make AccountsServer more extensible
2 parents fe08f70 + cc9b361 commit a8e0626

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
@@ -345,7 +345,7 @@ export class AccountsServer {
345345
throw new AccountsError('User not found');
346346
}
347347

348-
const impersonatedUser = await this.db.findUserByUsername(username);
348+
const impersonatedUser = await this.findUserByUsername(username);
349349
if (!impersonatedUser) {
350350
throw new AccountsError(`User ${username} not found`);
351351
}
@@ -776,7 +776,7 @@ export class AccountsServer {
776776
* @returns {Promise<void>} - Return a Promise.
777777
*/
778778
public async sendVerificationEmail(address: string): Promise<void> {
779-
const user = await this.db.findUserByEmail(address);
779+
const user = await this.findUserByEmail(address);
780780
if (!user) {
781781
throw new AccountsError('User not found', { email: address });
782782
}
@@ -813,7 +813,7 @@ export class AccountsServer {
813813
* @returns {Promise<void>} - Return a Promise.
814814
*/
815815
public async sendResetPasswordEmail(address: string): Promise<void> {
816-
const user = await this.db.findUserByEmail(address);
816+
const user = await this.findUserByEmail(address);
817817
if (!user) {
818818
throw new AccountsError('User not found', { email: address });
819819
}
@@ -841,7 +841,7 @@ export class AccountsServer {
841841
* @returns {Promise<void>} - Return a Promise.
842842
*/
843843
public async sendEnrollmentEmail(address: string): Promise<void> {
844-
const user = await this.db.findUserByEmail(address);
844+
const user = await this.findUserByEmail(address);
845845
if (!user) {
846846
throw new AccountsError('User not found', { email: address });
847847
}

0 commit comments

Comments
 (0)