nestjs_auth init..

This commit is contained in:
최준흠 2022-09-12 14:59:50 +09:00
parent 8a663c7bad
commit 69fa44ba03

View File

@ -43,7 +43,7 @@ export class TodoService {
} }
//단일 조회 //단일 조회
async fetchOne(where: Prisma.TodoWhereInput): Promise<Todo | null> { async fetchOne(where: Prisma.TodoWhereInput): Promise<Todo> {
return await this.prisma.todo.findFirstOrThrow({ where: where }) return await this.prisma.todo.findFirstOrThrow({ where: where })
} }
@ -56,7 +56,7 @@ export class TodoService {
async update(params: { async update(params: {
where: Prisma.TodoWhereUniqueInput where: Prisma.TodoWhereUniqueInput
data: Prisma.TodoUpdateInput data: Prisma.TodoUpdateInput
}): Promise<Todo | null> { }): Promise<Todo> {
const { where, data } = params const { where, data } = params
return await this.prisma.todo.update({ return await this.prisma.todo.update({
data, data,
@ -65,7 +65,7 @@ export class TodoService {
} }
//단일 삭제 //단일 삭제
async remove(where: Prisma.TodoWhereUniqueInput): Promise<Todo | null> { async remove(where: Prisma.TodoWhereUniqueInput) {
return await this.prisma.todo.delete({ where }) return await this.prisma.todo.delete({ where })
} }
} }