update function name

This commit is contained in:
davidwells 2018-06-11 17:12:39 -07:00
parent d4c3868e20
commit 943865b2c1

View file

@ -6,7 +6,7 @@ const client = new faunadb.Client({
}) })
exports.handler = (event, context, callback) => { exports.handler = (event, context, callback) => {
const id = event.path.replace(/\/\.netlify\/functions\/todos-read-one\//, "") const id = event.path.replace(/\/\.netlify\/functions\/todos-read\//, "")
console.log(`readOne todo ${id}`) console.log(`readOne todo ${id}`)
return client.query(q.Get(q.Ref(`classes/todos/${id}`))) return client.query(q.Get(q.Ref(`classes/todos/${id}`)))
.then((response) => { .then((response) => {