If you change the endpointName you receive the following error when trying to use a hook.
node_modules/kalamata/src/index.js:248
hooks[opts.endpointName][prefix][type].push(fn);
^
TypeError: Cannot read property 'before' of undefined
Here's a snippet of the code that produces this. The students table is actually named ncl_students, and as Bookshelf doesn't support table name prefixes I have to set the endpointName manually like so:
If you change the endpointName you receive the following error when trying to use a hook.
Here's a snippet of the code that produces this. The students table is actually named ncl_students, and as Bookshelf doesn't support table name prefixes I have to set the endpointName manually like so:
Unfortunately
hooks
still seems to use the actual table name, as it looks like this when I console.log it, and this seems to be causing the error.