update env key to FAUNADB_SERVER_SECRET
This commit is contained in:
parent
9b089e7c04
commit
271721bbc0
11 changed files with 18396 additions and 111 deletions
|
|
@ -10,17 +10,17 @@ exports.handler = (event, context, callback) => {
|
|||
const id = getId(event.path)
|
||||
console.log(`Function 'todo-delete' invoked. delete id: ${id}`)
|
||||
return client.query(q.Delete(q.Ref(`classes/todos/${id}`)))
|
||||
.then((response) => {
|
||||
console.log("success", response)
|
||||
return callback(null, {
|
||||
statusCode: 200,
|
||||
body: JSON.stringify(response)
|
||||
.then((response) => {
|
||||
console.log('success', response)
|
||||
return callback(null, {
|
||||
statusCode: 200,
|
||||
body: JSON.stringify(response)
|
||||
})
|
||||
}).catch((error) => {
|
||||
console.log('error', error)
|
||||
return callback(null, {
|
||||
statusCode: 400,
|
||||
body: JSON.stringify(error)
|
||||
})
|
||||
})
|
||||
}).catch((error) => {
|
||||
console.log("error", error)
|
||||
return callback(null, {
|
||||
statusCode: 400,
|
||||
body: JSON.stringify(error)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue