nestjs_auth init..
This commit is contained in:
parent
8a663c7bad
commit
69fa44ba03
@ -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 })
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ export class TodoService {
|
||||
async update(params: {
|
||||
where: Prisma.TodoWhereUniqueInput
|
||||
data: Prisma.TodoUpdateInput
|
||||
}): Promise<Todo | null> {
|
||||
}): Promise<Todo> {
|
||||
const { where, data } = params
|
||||
return await this.prisma.todo.update({
|
||||
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 })
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user