I find myself having to do this a fair bit:
function register(server, options, next) {
server.dependency(['auth-plugin'], function (_server, _next) {
after(_server, options, _next));
}
}
function after(server, options, next) {
// ... register routes, etc
}
Sure, I could use closures… but if the after API is designed around closures, why are we passing it server? If there's a reason to pass server, there's a reason to pass options.
Do we have a bug category for "API changes waiting for enough friends to justify a major version bump"?
I find myself having to do this a fair bit:
Sure, I could use closures… but if the
afterAPI is designed around closures, why are we passing itserver? If there's a reason to passserver, there's a reason to passoptions.Do we have a bug category for "API changes waiting for enough friends to justify a major version bump"?