From 056bbb0de73750b743965fa58b0510b586aa90f3 Mon Sep 17 00:00:00 2001 From: Brecht De Rooms Date: Thu, 23 Apr 2020 18:56:41 +0200 Subject: [PATCH] Add child db option to example --- .env.local.example | 1 + scripts/destroy.js | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.local.example b/.env.local.example index 8e6f988..c1abe76 100644 --- a/.env.local.example +++ b/.env.local.example @@ -1,4 +1,5 @@ REACT_APP_LOCAL___ADMIN= REACT_APP_LOCAL___BOOTSTRAP_FAUNADB_KEY= +REACT_APP_LOCAL___CHILD_DB_NAME= REACT_APP_LOCAL___CLOUDINARY_CLOUDNAME= REACT_APP_LOCAL___CLOUDINARY_TEMPLATE= diff --git a/scripts/destroy.js b/scripts/destroy.js index 6b4ce4b..b2a38a0 100644 --- a/scripts/destroy.js +++ b/scripts/destroy.js @@ -54,7 +54,7 @@ const deleteAll = async client => { const childDbName = process.env.REACT_APP_LOCAL___CHILD_DB_NAME if (typeof childDbName !== 'undefined') { // clean keys that are linked to this database - const deleted = await handleSetupError( + await handleSetupError( client.query( Map(Paginate(Documents(Keys())), x => Let( @@ -69,7 +69,6 @@ const deleteAll = async client => { ), 'delete keys - delete keys linked to database' ) - console.log(deleted) await handleSetupError( client.query(If(Exists(Database(childDbName)), Delete(Database(childDbName)), false)), 'database - delete child database'