diff --git a/packages/backend/migration/1724044488000-idCheck.js b/packages/backend/migration/1724044488000-idCheck.js index 2c3468eab9..8de6d0ab0e 100644 --- a/packages/backend/migration/1724044488000-idCheck.js +++ b/packages/backend/migration/1724044488000-idCheck.js @@ -9,12 +9,10 @@ export class idCheck1724044488000 { async up(queryRunner) { await queryRunner.query(`ALTER TABLE "user" ADD "idCheckRequired" boolean NOT NULL DEFAULT false`); await queryRunner.query(`ALTER TABLE "user" ADD "idVerified" boolean NOT NULL DEFAULT false`); - await queryRunner.query(`ALTER TABLE "user" ADD "idSession" character varying(1024) NULL`); } async down(queryRunner) { await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "idCheckRequired"`); await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "idVerified"`); - await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "idSession"`); } } diff --git a/packages/backend/src/models/User.ts b/packages/backend/src/models/User.ts index ca77b7bf97..092cce8b37 100644 --- a/packages/backend/src/models/User.ts +++ b/packages/backend/src/models/User.ts @@ -315,11 +315,6 @@ export class MiUser { }) public idVerified: boolean; - @Column('varchar', { - length: 1024, nullable: true, - }) - public idSession: string | null; - constructor(data: Partial) { if (data == null) return; diff --git a/packages/backend/src/server/StripeHookServerService.ts b/packages/backend/src/server/StripeHookServerService.ts index 93bb664850..ebb1c53db7 100644 --- a/packages/backend/src/server/StripeHookServerService.ts +++ b/packages/backend/src/server/StripeHookServerService.ts @@ -94,7 +94,7 @@ export class StripeHookServerService { }); } - this.logger.succ(`${user.username} has succesfully approved their ID via Session ${user.idSession}`); + this.logger.succ(`${user.username} has succesfully approved their ID via Session ${verificationSession.client_reference_id}`); await this.usersRepository.update(user.id, { idCheckRequired: false, idVerified: true }); diff --git a/packages/backend/src/server/api/endpoints/stripe/create-verify-session.ts b/packages/backend/src/server/api/endpoints/stripe/create-verify-session.ts index edb3a532ea..1978167c2c 100644 --- a/packages/backend/src/server/api/endpoints/stripe/create-verify-session.ts +++ b/packages/backend/src/server/api/endpoints/stripe/create-verify-session.ts @@ -74,10 +74,6 @@ export default class extends Endpoint { // eslint- }, }); - await this.usersRepository.update(me.id, { - idSession: verificationSession.client_reference_id, - }); - return { 'url': verificationSession.url }; }); }