We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello, iv spent the last 2 hours trying to figure this out
I have a table called issues with a array called tags : [ { value: '', label: '' }, { value: '', label: '' } ]
I started by patching this array with the old values + new values, but this means the user could edit the values on the front end technically
I then tried to use this inside a before hook on the patch :
context.app.service('issues').patch(id, { $push: { tags: data } })
But it either infinite looped or just deleted the table
How / where can i use this ?
Should it be on the before hook on a patch ?
Do i need a new API / service which will use the $push method?
The text was updated successfully, but these errors were encountered:
if anyone visits this, i made a new custom service for this
looked like this :
class Service { constructor(options) { this.options = options || {} this.issues = options.issues } async patch(id, data, params) { await this.issues.patch(id, { $push: { [data.target]: data } }) return await this.issues.get(id) } } module.exports = function(options) { return new Service(options) } module.exports.Service = Service
Sorry, something went wrong.
No branches or pull requests
Hello, iv spent the last 2 hours trying to figure this out
I have a table called issues with a array called tags : [ { value: '', label: '' }, { value: '', label: '' } ]
I started by patching this array with the old values + new values, but this means the user could edit the values on the front end technically
I then tried to use this inside a before hook on the patch :
But it either infinite looped or just deleted the table
How / where can i use this ?
Should it be on the before hook on a patch ?
Do i need a new API / service which will use the $push method?
The text was updated successfully, but these errors were encountered: