From e94102266968602e3af1c904f18ec7d1412ef9ad Mon Sep 17 00:00:00 2001 From: Alexander Onnikov Date: Wed, 8 May 2024 12:42:44 +0700 Subject: [PATCH] fix: add missing productId to getAccountInfo Signed-off-by: Alexander Onnikov --- server/account/src/operations.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/account/src/operations.ts b/server/account/src/operations.ts index 01732e7c1d5..36533b57814 100644 --- a/server/account/src/operations.ts +++ b/server/account/src/operations.ts @@ -226,7 +226,7 @@ function toAccountInfo (account: Account): AccountInfo { return result } -async function getAccountInfo (ctx: MeasureContext, db: Db, email: string, password: string): Promise { +async function getAccountInfo (ctx: MeasureContext, db: Db, productId: string, email: string, password: string): Promise { const account = await getAccount(db, email) if (account === null) { throw new PlatformError(new Status(Severity.ERROR, platform.status.AccountNotFound, { account: email })) @@ -285,7 +285,7 @@ export async function login ( ): Promise { const email = cleanEmail(_email) try { - const info = await getAccountInfo(ctx, db, email, password) + const info = await getAccountInfo(ctx, db, productId, email, password) const result = { endpoint: getEndpoint(), email, @@ -1496,7 +1496,7 @@ export async function changePassword ( password: string ): Promise { const { email } = decodeToken(token) - const account = await getAccountInfo(ctx, db, email, oldPassword) + const account = await getAccountInfo(ctx, db, productId, email, oldPassword) const salt = randomBytes(32) const hash = hashWithSalt(password, salt)