From 59f0dbc677898dde8c08fca1cd1c57dea5906beb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Mon, 24 Jun 2019 10:05:20 +0200 Subject: [PATCH] fixup! example/todo-list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address code review comments Signed-off-by: Miroslav Bajtoš --- .../todo-list/src/controllers/todo-list.controller.ts | 8 ++++---- examples/todo-list/src/controllers/todo.controller.ts | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/todo-list/src/controllers/todo-list.controller.ts b/examples/todo-list/src/controllers/todo-list.controller.ts index 52781aa5178f..ebac19f52ce9 100644 --- a/examples/todo-list/src/controllers/todo-list.controller.ts +++ b/examples/todo-list/src/controllers/todo-list.controller.ts @@ -95,11 +95,11 @@ export class TodoListController { }, }, }) - obj: Partial, + todoList: Partial, @param.query.object('where', getWhereSchemaFor(TodoList)) where?: Where, ): Promise { - return await this.todoListRepository.updateAll(obj, where); + return await this.todoListRepository.updateAll(todoList, where); } @get('/todo-lists/{id}', { @@ -138,9 +138,9 @@ export class TodoListController { }, }, }) - obj: Partial, + todoList: Partial, ): Promise { - await this.todoListRepository.updateById(id, obj); + await this.todoListRepository.updateById(id, todoList); } @del('/todo-lists/{id}', { diff --git a/examples/todo-list/src/controllers/todo.controller.ts b/examples/todo-list/src/controllers/todo.controller.ts index 2e79eea7ce1d..67d953a64158 100644 --- a/examples/todo-list/src/controllers/todo.controller.ts +++ b/examples/todo-list/src/controllers/todo.controller.ts @@ -101,11 +101,11 @@ export class TodoController { @requestBody({ content: { 'application/json': { - schema: getModelSchemaRef(TodoList, {partial: true}), + schema: getModelSchemaRef(Todo, {partial: true}), }, }, }) - todo: Partial, + todo: Partial, ): Promise { await this.todoRepo.updateById(id, todo); }