Fix email mismatch error message
Some checks failed
Node.js CI / build (16.x) (push) Has been cancelled
Node.js CI / build (20.x) (push) Has been cancelled

This commit is contained in:
Guangcong Luo 2024-10-18 02:12:12 +00:00
parent fe53f73b62
commit 5f07341fe9

View File

@ -411,7 +411,7 @@ export class Session {
});
const payload = ticket.getPayload()!; // dunno why this would happen.
if (payload.email?.toLowerCase() !== userData.email.slice(0, -1).toLowerCase()) {
throw new ActionError(`Wrong Google account for this Showdown account (must be ${userData.email.slice(0, -1)} not ${payload.email})`);
throw new ActionError(`Wrong Google account for this Showdown account (${payload.email} doesn't match this account)`);
}
return true;
} catch (e) {