ListBot icon indicating copy to clipboard operation
ListBot copied to clipboard

[ENCRYPTION] Integrate the encrypt.js file as a middleware to optimize project

Open AldoTu opened this issue 5 years ago • 6 comments

AldoTu avatar Oct 09 '20 23:10 AldoTu

:)

AldoTu avatar Oct 09 '20 23:10 AldoTu

Hey @AldoTu I would like to work on it. Please can you provide more deatils? Thanks!

Apurva-Singh avatar Oct 10 '20 15:10 Apurva-Singh

@AldoTu think you can introduce @Apurva-Singh to the encryption middleware?

tomassirio avatar Oct 10 '20 16:10 tomassirio

Hi @Apurva-Singh! What we want to do is to use the encrypt.js script inside the utils folder to encrypt the DB. We got to the conclusion that we should apply the script directly in the DB models so what I'm looking for is to execute the script as a middleware every time there's interaction with the models.

AldoTu avatar Oct 10 '20 17:10 AldoTu

Some resources that I found: https://mongoosejs.com/docs/plugins.html https://thecodebarbarian.com/2015/03/06/guide-to-mongoose-plugins

We might be able to use Schema.post or something to manipulate the values after they're put in.

aaronzshey avatar Oct 10 '20 19:10 aaronzshey

#114

aaronzshey avatar Oct 13 '20 05:10 aaronzshey