Skip to content

Commit

Permalink
fix : query delete user
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedrinvits committed Oct 18, 2024
1 parent c234b5e commit 2eda268
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion data/deleteUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { auth } from "../auth";
import { getUserByEmail,getUserById } from "./user";

export const deleteUser = async (
userId : number
) => {
try {
const session = await auth();
Expand All @@ -18,7 +19,7 @@ export const deleteUser = async (

// Atualizando as informações do usuário no banco de dados
const updatedUser = await db.user.delete({
where: { id: user.id } // Atualiza o usuário baseado no ID
where: { id: userId } // Atualiza o usuário baseado no ID
});

// console.log('Informações atualizadas:', updatedUser);
Expand Down

0 comments on commit 2eda268

Please sign in to comment.