Skip to content

Commit

Permalink
fixup! example/todo-list
Browse files Browse the repository at this point in the history
Address code review comments

Signed-off-by: Miroslav Bajtoš <[email protected]>
  • Loading branch information
bajtos committed Jun 24, 2019
1 parent 6e16780 commit 59f0dbc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions examples/todo-list/src/controllers/todo-list.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ export class TodoListController {
},
},
})
obj: Partial<TodoList>,
todoList: Partial<TodoList>,
@param.query.object('where', getWhereSchemaFor(TodoList))
where?: Where<TodoList>,
): Promise<Count> {
return await this.todoListRepository.updateAll(obj, where);
return await this.todoListRepository.updateAll(todoList, where);
}

@get('/todo-lists/{id}', {
Expand Down Expand Up @@ -138,9 +138,9 @@ export class TodoListController {
},
},
})
obj: Partial<TodoList>,
todoList: Partial<TodoList>,
): Promise<void> {
await this.todoListRepository.updateById(id, obj);
await this.todoListRepository.updateById(id, todoList);
}

@del('/todo-lists/{id}', {
Expand Down
4 changes: 2 additions & 2 deletions examples/todo-list/src/controllers/todo.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ export class TodoController {
@requestBody({
content: {
'application/json': {
schema: getModelSchemaRef(TodoList, {partial: true}),
schema: getModelSchemaRef(Todo, {partial: true}),
},
},
})
todo: Partial<TodoList>,
todo: Partial<Todo>,
): Promise<void> {
await this.todoRepo.updateById(id, todo);
}
Expand Down

0 comments on commit 59f0dbc

Please sign in to comment.