Skip to content

Add custom properties to stored object #93

@origooo

Description

@origooo

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)
}, ...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions