Skip to content

Commit

Permalink
fix: gun try to fix privatedb goodqa issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sirpy committed Aug 16, 2019
1 parent 259803e commit e210d70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/server/gun/gun-middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ class GunDB implements StorageAPI {
memory,
name,
chunk: 1024 * 32,
batch: 10
batch: 10,
axe: true,
multicast: false
})
} else {
this.gun = Gun({ web: server, file: name, gc_delay, memory, name, axe: true, multicast: false })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,10 @@ const Helper = {
try {
let res: SearchResult = await ZoomClient.search(zoomData)
//we dont need the audittrailimages
let results = _.map(res.data.results, o => _.omit(o, 'auditTrailImage'))
res.data.results = results
let results = _.map(_.get(res, 'data.results', []), o => _.omit(o, 'auditTrailImage'))
_.set(res, 'data.results', results)
log.debug('search result:', { res })
const validMatches = _.filter(res.data.results, r =>
r.zoomSearchMatchLevel.match(/ZOOM_SEARCH_MATCH_LEVEL_[0-2]/)
)
const validMatches = _.filter(results, r => r.zoomSearchMatchLevel.match(/ZOOM_SEARCH_MATCH_LEVEL_[0-2]/))
return (
validMatches.length > 0 && _.find(validMatches, { enrollmentIdentifier: identifier }) === undefined // if found matches - verify it's not the user itself
)
Expand Down

0 comments on commit e210d70

Please sign in to comment.