mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-24 15:05:13 +00:00
upd: remove idSession since Stripe tends to return NULL
This commit is contained in:
parent
0627f84e30
commit
dbded3b68d
4 changed files with 1 additions and 12 deletions
|
@ -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"`);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -315,11 +315,6 @@ export class MiUser {
|
|||
})
|
||||
public idVerified: boolean;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 1024, nullable: true,
|
||||
})
|
||||
public idSession: string | null;
|
||||
|
||||
constructor(data: Partial<MiUser>) {
|
||||
if (data == null) return;
|
||||
|
||||
|
|
|
@ -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 });
|
||||
|
||||
|
|
|
@ -74,10 +74,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
},
|
||||
});
|
||||
|
||||
await this.usersRepository.update(me.id, {
|
||||
idSession: verificationSession.client_reference_id,
|
||||
});
|
||||
|
||||
return { 'url': verificationSession.url };
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue