Skip to content

Commit

Permalink
Add child db option to example
Browse files Browse the repository at this point in the history
  • Loading branch information
Brecht De Rooms committed Apr 23, 2020
1 parent ca8ab78 commit 056bbb0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env.local.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
REACT_APP_LOCAL___ADMIN=<insert faunadb admin key>
REACT_APP_LOCAL___BOOTSTRAP_FAUNADB_KEY=<insert faunadb bootstrap key>
REACT_APP_LOCAL___CHILD_DB_NAME=<insert optional child db name>
REACT_APP_LOCAL___CLOUDINARY_CLOUDNAME=<insert cloudinary cloudname>
REACT_APP_LOCAL___CLOUDINARY_TEMPLATE=<insert cloudinary template or set it to 'ml_default' and make that template public>
3 changes: 1 addition & 2 deletions scripts/destroy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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'
Expand Down

0 comments on commit 056bbb0

Please sign in to comment.