Skip to content

Commit

Permalink
fix(server): avoid unknown fields in create query (#9047)
Browse files Browse the repository at this point in the history
  • Loading branch information
forehalo authored Dec 6, 2024
1 parent 8545644 commit d6869ca
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ export class UniversalSubscription1733125339942 {
});

await db.subscription.createMany({
data: oldSubscriptions.map(s => ({
targetId: s.userId,
...s,
data: oldSubscriptions.map(({ userId, ...subscription }) => ({
targetId: userId,
...subscription,
})),
});

Expand Down

0 comments on commit d6869ca

Please sign in to comment.