mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
Use retryTransaction instead of raw $transaction
Some checks failed
DB migration compat / Check if migrations changed (push) Has been cancelled
DB migration compat / Back-compat — Current branch migrations with ${{ needs.check-migrations-changed.outputs.base_branch }} branch code (push) Has been cancelled
DB migration compat / Forward-compat — Current branch code with ${{ needs.check-migrations-changed.outputs.base_branch }} branch migrations (push) Has been cancelled
DB migration compat / No migration changes (skipped) (push) Has been cancelled
Some checks failed
DB migration compat / Check if migrations changed (push) Has been cancelled
DB migration compat / Back-compat — Current branch migrations with ${{ needs.check-migrations-changed.outputs.base_branch }} branch code (push) Has been cancelled
DB migration compat / Forward-compat — Current branch code with ${{ needs.check-migrations-changed.outputs.base_branch }} branch migrations (push) Has been cancelled
DB migration compat / No migration changes (skipped) (push) Has been cancelled
Fixes lint error: .$transaction is disallowed, use retryTransaction().
This commit is contained in:
parent
2971b655ff
commit
e74b2cd89e
@ -1,7 +1,7 @@
|
||||
import { recordExternalDbSyncDeletion } from "@/lib/external-db-sync";
|
||||
import { validateRedirectUrl } from "@/lib/redirect-urls";
|
||||
import { getSoleTenancyFromProjectBranch, getTenancy, Tenancy } from "@/lib/tenancies";
|
||||
import { globalPrismaClient } from "@/prisma-client";
|
||||
import { globalPrismaClient, retryTransaction } from "@/prisma-client";
|
||||
import { Prisma, VerificationCodeType } from "@/generated/prisma/client";
|
||||
import { KnownErrors } from "@stackframe/stack-shared";
|
||||
import { ProjectsCrud } from "@stackframe/stack-shared/dist/interface/crud/projects";
|
||||
@ -277,7 +277,7 @@ export function createVerificationCodeHandler<
|
||||
const { project, branchId } = parseProjectBranchCombo(revokeOptions);
|
||||
const tenancy = await getSoleTenancyFromProjectBranch(project.id, branchId);
|
||||
|
||||
await globalPrismaClient.$transaction(async (tx) => {
|
||||
await retryTransaction(globalPrismaClient, async (tx) => {
|
||||
// Record deletion for external DB sync if this is a TEAM_INVITATION code
|
||||
if (options.type === 'TEAM_INVITATION') {
|
||||
await recordExternalDbSyncDeletion(tx, {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user