Skip to content

Commit

Permalink
fix(migrate): use transactionId instead of id on mutation payload
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoerge committed Jan 30, 2024
1 parent df310cf commit a82df02
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {Mutation, Transaction} from '../../mutations'
import {isTransaction} from '../../mutations/asserters'

export interface TransactionPayload {
id?: string
transactionId?: string
mutations: SanityMutation[]
}

Expand All @@ -16,7 +16,7 @@ export async function* toSanityMutations(
for (const mut of arrify(mutation)) {
if (isTransaction(mut)) {
yield {
id: mut.id,
transactionId: mut.id,
mutations: SanityEncoder.encode(mut.mutations as any) as SanityMutation[],
}
continue
Expand Down

0 comments on commit a82df02

Please sign in to comment.