init commit ⊂◉‿◉つ

This commit is contained in:
davidwells 2018-06-11 15:48:00 -07:00
commit c8c51623a6
19 changed files with 7568 additions and 0 deletions

View file

@ -0,0 +1,19 @@
'use strict';
const faunadb = require('faunadb');
const q = faunadb.query;
const client = new faunadb.Client({
secret: process.env.FAUNADB_SECRET
});
module.exports = (event, callback) => {
console.log("readAll todo");
return client.query(q.Paginate(q.Match(q.Ref("indexes/all_todos"))))
.then((response) => {
console.log("success", response);
callback(false, response);
}).catch((error) => {
console.log("error", error);
callback(error)
})
};