Skip to content

Commit

Permalink
add: [WIP] gundb publish support
Browse files Browse the repository at this point in the history
  • Loading branch information
hadarbmdev committed May 29, 2019
1 parent e3f1cf6 commit 3a44998
Show file tree
Hide file tree
Showing 7 changed files with 8,674 additions and 1 deletion.
1,708 changes: 1,708 additions & 0 deletions publicdb-!-36e.tmp

Large diffs are not rendered by default.

1,708 changes: 1,708 additions & 0 deletions publicdb-!-4rq.tmp

Large diffs are not rendered by default.

1,807 changes: 1,807 additions & 0 deletions publicdb-!-4t7.tmp

Large diffs are not rendered by default.

1,716 changes: 1,716 additions & 0 deletions publicdb-!-8nc.tmp

Large diffs are not rendered by default.

1,732 changes: 1,732 additions & 0 deletions publicdb-!-b5s.tmp

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/server/verification/verification.js
Expand Up @@ -19,6 +19,7 @@ class Verifications implements VerificationAPI {
// log.info('searchData', { searchData })
const livenessPassed = await Helper.isLivenessPassed(livenessData)
GunDBPublic.gun.get(sessionId).put({ livenessPassed }) // publish to subscribers
this.log.debug('written FR LIVENESS status to gun', GunDBPublic.gun.get(sessionId))
const isDuplicate = await Helper.isDuplicatesExist(searchData, verificationData.enrollmentIdentifier)
GunDBPublic.gun.get(sessionId).put({ isDuplicate }) // publish to subscribers
this.log.debug('liveness result:', { user: user.identifier, livenessPassed })
Expand Down
3 changes: 2 additions & 1 deletion src/server/verification/verificationAPI.js
Expand Up @@ -22,9 +22,10 @@ const setup = (app: Router, verifier: VerificationAPI, storage: StorageAPI) => {
wrapAsync(async (req, res, next) => {
const log = req.log.child({ from: 'livenesstest' })
const { body, files, user } = req
log.debug({ files, body })
//log.debug({ files, body })
const sessionId = body.sessionId
GunDBPublic.gun.get(sessionId).put({}) // publish initialized data to subscribers
log.debug('written FR status to gun', GunDBPublic.gun.get(sessionId))
const verificationData = {
facemapFile: _.find(files, { fieldname: 'facemap' }).path,
auditTrailImageFile: _.find(files, { fieldname: 'auditTrailImage' }).path,
Expand Down

0 comments on commit 3a44998

Please sign in to comment.