Skip to content

Commit

Permalink
modify: delete処理追加
Browse files Browse the repository at this point in the history
  • Loading branch information
kensiiwasaki committed Nov 23, 2023
1 parent 4e954a2 commit d88fb5c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/datasource/prisma/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ import { PrismaClient } from "@prisma/client";

const prisma = new PrismaClient();

export const findAllTask = async (userId: string) => {
export const findUserAllTask = async (userId: string) => {
return await prisma.task.findMany({ where: { userId } });
};

export const deleteUserAllTask = async (userId: string) => {
return await prisma.task.deleteMany({
where: {
userId: userId,
},
});
};

0 comments on commit d88fb5c

Please sign in to comment.