Skip to content

Commit

Permalink
cannot return result directly fix it
Browse files Browse the repository at this point in the history
  • Loading branch information
SOVLOOKUP committed Jan 28, 2021
1 parent faaf4c6 commit 3f1797a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/server/src/integrations/arangodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ class ArangoDBIntegration {
try {
const result = await this.client.query(query.sql)
let rl = []
return result.forEach(r => rl.push(r))
await result.forEach(r => rl.push(r))
return rl
} catch (err) {
console.error("Error querying arangodb", err.message)
throw err
Expand All @@ -69,7 +70,8 @@ class ArangoDBIntegration {
aql`INSERT ${query.json} INTO ${clc} LET n = NEW RETURN NEW`
)
let rl = []
return result.forEach(r => rl.push(r))
await result.forEach(r => rl.push(r))
return rl
} catch (err) {
console.error("Error querying arangodb", err.message)
throw err
Expand Down

0 comments on commit 3f1797a

Please sign in to comment.