Skip to content

Commit

Permalink
fix(core): fix rebase issue
Browse files Browse the repository at this point in the history
fix rebase issue
  • Loading branch information
simeng-li committed Jul 31, 2024
1 parent 9fe79c3 commit ec4027d
Showing 1 changed file with 0 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,41 +18,6 @@ export default function backupCodeVerificationRoutes<T extends ExperienceInterac
) {
const { libraries, queries } = tenantContext;

router.post(
`${experienceRoutes.verification}/backup-code/generate`,
koaGuard({
status: [200, 400],
response: z.object({
verificationId: z.string(),
codes: z.array(z.string()),
}),
}),
async (ctx, next) => {
const { experienceInteraction } = ctx;

assertThat(experienceInteraction.identifiedUserId, 'session.identifier_not_found');

const backupCodeVerificationRecord = BackupCodeVerification.create(
libraries,
queries,
experienceInteraction.identifiedUserId
);

const codes = backupCodeVerificationRecord.generate();

ctx.experienceInteraction.setVerificationRecord(backupCodeVerificationRecord);

await ctx.experienceInteraction.save();

ctx.body = {
verificationId: backupCodeVerificationRecord.id,
codes,
};

return next();
}
);

router.post(
`${experienceRoutes.verification}/backup-code/generate`,
koaGuard({
Expand Down

0 comments on commit ec4027d

Please sign in to comment.