Explorar o código

Merge pull request #212 from vdbongard/fix-stats-for-custom-domains

Fix createVisit query when using custom domains
Pouria Ezzati %!s(int64=6) %!d(string=hai) anos
pai
achega
3bdb85f050
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      server/db/url.js

+ 1 - 1
server/db/url.js

@@ -73,7 +73,7 @@ exports.createVisit = async params => {
   const { records = [] } = await session.writeTransaction(tx =>
     tx.run(
       'MATCH (l:URL { id: $id }) WHERE l.count < $limit' +
-        `${params.domain ? 'MATCH (l)-[:USES]->({ name: $domain })' : ''} ` +
+        `${params.domain ? ' MATCH (l)-[:USES]->({ name: $domain })' : ''} ` +
         'CREATE (v:VISIT)' +
         'MERGE (b:BROWSER { browser: $browser })' +
         'MERGE (c:COUNTRY { country: $country })' +