Skip to content

Commit 59f0dbc

Browse files
committed
fixup! example/todo-list
Address code review comments Signed-off-by: Miroslav Bajtoš <[email protected]>
1 parent 6e16780 commit 59f0dbc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

examples/todo-list/src/controllers/todo-list.controller.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ export class TodoListController {
9595
},
9696
},
9797
})
98-
obj: Partial<TodoList>,
98+
todoList: Partial<TodoList>,
9999
@param.query.object('where', getWhereSchemaFor(TodoList))
100100
where?: Where<TodoList>,
101101
): Promise<Count> {
102-
return await this.todoListRepository.updateAll(obj, where);
102+
return await this.todoListRepository.updateAll(todoList, where);
103103
}
104104

105105
@get('/todo-lists/{id}', {
@@ -138,9 +138,9 @@ export class TodoListController {
138138
},
139139
},
140140
})
141-
obj: Partial<TodoList>,
141+
todoList: Partial<TodoList>,
142142
): Promise<void> {
143-
await this.todoListRepository.updateById(id, obj);
143+
await this.todoListRepository.updateById(id, todoList);
144144
}
145145

146146
@del('/todo-lists/{id}', {

examples/todo-list/src/controllers/todo.controller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ export class TodoController {
101101
@requestBody({
102102
content: {
103103
'application/json': {
104-
schema: getModelSchemaRef(TodoList, {partial: true}),
104+
schema: getModelSchemaRef(Todo, {partial: true}),
105105
},
106106
},
107107
})
108-
todo: Partial<TodoList>,
108+
todo: Partial<Todo>,
109109
): Promise<void> {
110110
await this.todoRepo.updateById(id, todo);
111111
}

0 commit comments

Comments
 (0)