From 3fd0450f2d036aae527858360708363f776f469f Mon Sep 17 00:00:00 2001 From: davidwells Date: Mon, 11 Jun 2018 16:15:03 -0700 Subject: [PATCH] fancy imports --- functions/todos-create.js | 3 ++- functions/todos-delete.js | 3 ++- functions/todos-read-all.js | 3 ++- functions/todos-read-one.js | 3 ++- functions/todos-update.js | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/functions/todos-create.js b/functions/todos-create.js index c5666c7..78173fc 100644 --- a/functions/todos-create.js +++ b/functions/todos-create.js @@ -1,6 +1,7 @@ 'use strict'; -const faunadb = require('faunadb'); +import faunadb from 'faunadb' +// const faunadb = require('faunadb'); const q = faunadb.query; const client = new faunadb.Client({ secret: process.env.FAUNADB_SECRET diff --git a/functions/todos-delete.js b/functions/todos-delete.js index b8ddd2c..0e2f105 100644 --- a/functions/todos-delete.js +++ b/functions/todos-delete.js @@ -1,6 +1,7 @@ 'use strict'; -const faunadb = require('faunadb'); +import faunadb from 'faunadb' +// const faunadb = require('faunadb'); const q = faunadb.query; const client = new faunadb.Client({ secret: process.env.FAUNADB_SECRET diff --git a/functions/todos-read-all.js b/functions/todos-read-all.js index c47b7a3..fa51b38 100644 --- a/functions/todos-read-all.js +++ b/functions/todos-read-all.js @@ -1,6 +1,7 @@ 'use strict'; -const faunadb = require('faunadb'); +import faunadb from 'faunadb' +// const faunadb = require('faunadb'); const q = faunadb.query; const client = new faunadb.Client({ secret: process.env.FAUNADB_SECRET diff --git a/functions/todos-read-one.js b/functions/todos-read-one.js index 14e0198..64b65c4 100644 --- a/functions/todos-read-one.js +++ b/functions/todos-read-one.js @@ -1,6 +1,7 @@ 'use strict'; -const faunadb = require('faunadb'); +import faunadb from 'faunadb' +// const faunadb = require('faunadb'); const q = faunadb.query; const client = new faunadb.Client({ secret: process.env.FAUNADB_SECRET diff --git a/functions/todos-update.js b/functions/todos-update.js index 4c9ea90..33f1e52 100644 --- a/functions/todos-update.js +++ b/functions/todos-update.js @@ -1,6 +1,7 @@ 'use strict'; -const faunadb = require('faunadb'); +import faunadb from 'faunadb' +// const faunadb = require('faunadb'); const q = faunadb.query; const client = new faunadb.Client({ secret: process.env.FAUNADB_SECRET