GoodDollar/GoodServer

Separate concerns on VerificationAPI.js in FR process

Closed this issue · 0 comments

The VerificationAPI.js FR process currently has too many concerns:

  1. Load the files that were automatically stored by multer middleware
  2. call verifyUser() which performs face recognition process (see below)
  3. cleanup loaded files after verifying the user
  4. in case user is verified, whitelist the user in the Admin Wallet contract, and update the user on the GD storage as verified.

This issue is asking to separate the concerns to minimize the code on VerificationAPI.js and follow the SOLID approach.