return data
This commit is contained in:
parent
2600c6f38c
commit
1019fa7696
5 changed files with 40 additions and 10 deletions
|
|
@ -13,9 +13,15 @@ exports.handler = (event, context, callback) => {
|
|||
return client.query(q.Update(q.Ref("classes/todos/"+event.pathParameters.id), {data}))
|
||||
.then((response) => {
|
||||
console.log("success", response);
|
||||
callback(false, response);
|
||||
return callback(null, {
|
||||
statusCode: 200,
|
||||
body: JSON.stringify(response)
|
||||
})
|
||||
}).catch((error) => {
|
||||
console.log("error", error);
|
||||
callback(error)
|
||||
return callback(null, {
|
||||
statusCode: 400,
|
||||
body: JSON.stringify(error)
|
||||
})
|
||||
})
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue