-
Notifications
You must be signed in to change notification settings - Fork 58
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
Overriding knex-adapter default post-create behaviour #207
Comments
You can extend the adapter and return the const { Service } = require( 'feathers-knex');
class MyService extends Service {
async create(data, params) {
const created = await super.create(data, params);
return this.get(created.id, params);
}
} |
Thanks but this aint working, and it's impossible to debug, I'm only recieving
even though
|
I can't reproduce this. A Not Acceptable error usually happens when you don't set a |
|
Hey there,
After inserting an item using the 'create' service method knex-adapter automatically gets the item inserted from the table.
Is there a way to override this 'get' behaviour?
I for example have a special object i return to the user, and not the database fields directly.
Ultimately it would be best if it could use the service get method, instead of a query get.
The text was updated successfully, but these errors were encountered: