Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom properties to stored object #93

Open
origooo opened this issue Jul 5, 2021 · 0 comments
Open

Add custom properties to stored object #93

origooo opened this issue Jul 5, 2021 · 0 comments

Comments

@origooo
Copy link

origooo commented Jul 5, 2021

Thanks for a great package!

I was wondering if there is a way for adding custom properties to the object which eventually is stored in whatever persistent storage one has picked?

My use case is that if a user hits their upper limit on an endpoint and later contact our support it's a bit challenging to figure out what entry in e.g. express-brute-mongoose belongs to them. I would like to be able to add for example a user id or email.

Is there a way to do this already, or am I thinking about it wrong?

From what I can see in row 127 in index.js (version 1.0.1) it is only looking at the predefined properties;

this.store.set(key, {
	count: count+1,
	lastRequest: new Date(this.now()),
	firstRequest: new Date(firstRequestTime)
}, ...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant