chore: remove userEmail to email

This commit is contained in:
bo0tzz
2026-04-18 17:28:21 +02:00
parent 12e36ad082
commit e583e3c55a
4 changed files with 5 additions and 5 deletions
@@ -7,7 +7,7 @@ export async function up(db: Kysely<any>): Promise<void> {
"token" bytea NOT NULL,
"oauthSub" varchar NOT NULL,
"oauthSid" varchar,
"userEmail" varchar NOT NULL,
"email" varchar NOT NULL,
"expiresAt" timestamp with time zone NOT NULL,
"createdAt" timestamp with time zone NOT NULL DEFAULT now()
);
@@ -15,7 +15,7 @@ export class OAuthLinkTokenTable {
oauthSid!: string | null;
@Column()
userEmail!: string;
email!: string;
@Column({ type: 'timestamp with time zone' })
expiresAt!: Timestamp;
+2 -2
View File
@@ -98,7 +98,7 @@ describe(AuthService.name, () => {
id: 'token-id',
oauthSub: 'oauth-sub-123',
oauthSid: null,
userEmail: user.email,
email: user.email,
token: Buffer.from('hashed'),
expiresAt: new Date(Date.now() + 600_000),
createdAt: new Date(),
@@ -120,7 +120,7 @@ describe(AuthService.name, () => {
id: 'token-id',
oauthSub: 'oauth-sub-123',
oauthSid: 'idp-sid-456',
userEmail: user.email,
email: user.email,
token: Buffer.from('hashed'),
expiresAt: new Date(Date.now() + 600_000),
createdAt: new Date(),
+1 -1
View File
@@ -356,7 +356,7 @@ export class AuthService extends BaseService {
token: hashedToken,
oauthSub: profile.sub,
oauthSid: oauthSid ?? null,
userEmail: emailUser.email,
email: emailUser.email,
expiresAt: DateTime.now().plus({ minutes: 10 }).toJSDate(),
});
throw new OAuthLinkRequiredException(emailUser.email, plainToken);