From 8b257d6097b6289cdd03733aa36a153369e62525 Mon Sep 17 00:00:00 2001 From: Daniel Mewes Date: Tue, 19 May 2015 11:05:27 -0700 Subject: [PATCH] Replace returnVals by returnChanges (angular app) --- todo-angular-koa/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/todo-angular-koa/app.js b/todo-angular-koa/app.js index 2a0418d..72c039e 100644 --- a/todo-angular-koa/app.js +++ b/todo-angular-koa/app.js @@ -63,7 +63,7 @@ function* create(next) { try{ var todo = yield parse(this); todo.createdAt = r.now(); // Set the field `createdAt` to the current time - var result = yield r.table('todos').insert(todo, {returnVals: true}).run(this._rdbConn); + var result = yield r.table('todos').insert(todo, {returnChanges: true}).run(this._rdbConn); todo = result.new_val; // todo now contains the previous todo + a field `id` and `createdAt` this.body = JSON.stringify(todo); @@ -84,7 +84,7 @@ function* update(next) { throw new Error("The todo must have a field `id`."); } - var result = yield r.table('todos').get(todo.id).update(todo, {returnVals: true}).run(this._rdbConn); + var result = yield r.table('todos').get(todo.id).update(todo, {returnChanges: true}).run(this._rdbConn); this.body = JSON.stringify(result.new_val); } catch(e) {