If you can give a slight pointer on what needs to be removed this would very nice for newcomer to PR, what do you think?
I'd give it a shot!
While that would be awesome, I expect this to require changes to both podium and hapi, which might make it more complex than a typical new contributor issue. What changes those should be is also somewhat of a design decision. Does someone see a simpler path?
@devinivy oh I thought it was just removing some joi validation calls?
We can still validate the event but not validate the same events over and over.
I was thinking in something like this:
const finishEvent = new Podium.Event('finish'); //event was validated here
somePodiumInstance.registerEvent(finishEvent); //no need to validate since it is a Podium.Event instance.
somePodiumInstance.registerEvent('disconnect'); //validate this one as we already do
in request.js
internals.events = {
finish: new Podium.Event('finish'),
peek: new Podium.Event({ name: 'peek', spread: true }),
disconnect: new Podium.Event('disconnect')
}
/*...*/
internals.Request = function (connection, req, res, options) {
Podium.call(this, internals.events.finish, internals.events.peek, internals.events.disconnect);
/*...*/
If everyone like this approach I can start by making a PR to podium to get this moving :P
Just leave it for me... hence why it is already assigned. I am still thinking how I want to implement this.
Most helpful comment
Just leave it for me... hence why it is already assigned. I am still thinking how I want to implement this.