JaneJeon / objection-hashid

Objection plugin to automatically obfuscate model ids using hashids!
https://janejeon.github.io/objection-hashid
GNU Lesser General Public License v3.0
14 stars 6 forks source link

pull out decoded ID for hashedFields #115

Closed jakeorr closed 3 years ago

jakeorr commented 3 years ago

Hello! 👋

First off, thanks for the handy project. It's been great to use so far.

I noticed an issue related to the hashedFields static model property. It seemed like the hashed fields we being respected, but the decoding wasn't happening properly.

I built a project to reproduce the issue and to try out the fix. More description in the readme: https://github.com/jakeorr/objection-hashid-investigation

JaneJeon commented 3 years ago

Huh, I'm actually surprised it somehow didn't break on my own codebases (which uses objection-hashid).

Thanks for the easy reproduction, I'll be sure to add test cases covering this.

JaneJeon commented 3 years ago

I will upload the fixed version to npm as soon as I can write a test for it.

jakeorr commented 3 years ago

Sounds great, thanks @JaneJeon!

JaneJeon commented 3 years ago

It's already been uploaded to npm, so just bump your version of objection-hashid!