Skip to content

Commit

Permalink
fix: delete child also
Browse files Browse the repository at this point in the history
  • Loading branch information
Vann-Dev committed May 6, 2024
1 parent a28520b commit 9269101
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/routes/account/delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ async def delete_account(id):
db = Prisma()

await db.connect()

await db.user.delete_many(
where={
"account_id": id
}
)

data = await db.account.delete(
where={
"id": id
}
},
)

await db.disconnect()
Expand Down

0 comments on commit 9269101

Please sign in to comment.