Comments (6)
A few options:
- Add a beforeRemote hook to patch the filter object
- Add a
belongsTo
relation toInstallation
. You should be able to do so using a boot script. - Submit a PR so that we can add
belongsTo
relations toInstallation
.
from loopback-component-push.
Could you elaborate on the first one please?
from loopback-component-push.
MyModel.beforeRemote('find', function(ctx, inst, next) {
var filter = ctx.args[0];
// Patch filter here
...
next();
});
from loopback-component-push.
For anyone interested in the result: https://gist.github.com/nullEuro/6ea7c6c1de7206a44fd3
Feel free to criticize.
from loopback-component-push.
This is great. We should try to generalize the solution. such as:
Allowing the request to contain variables, for example:
{
where: {
userId: {{ctx.user.id}}
}
}
from loopback-component-push.
Closing this as there is nothing left to resolve here.
from loopback-component-push.
Related Issues (20)
- Add globalization HOT 1
- EMFILE errors happening recently HOT 4
- CI failures for windows HOT 1
- Support APNS new HTTP/2 JWT Model HOT 11
- Push Notification error with AWS? HOT 2
- Push connector overrides EventEmitter events of a loopback model HOT 4
- Push Notification Rethrow non-MySQL errors HOT 2
- Add FCM support for iOS devices HOT 1
- Getting JWT Token must be defined, property "token" is undefined in v3.0.0 HOT 4
- get error "[Error: read ECONNRESET] code: 'ECONNRESET'" sometimes using Push.notifyByQuery HOT 2
- iOS provider: add support for mutable-content key HOT 2
- Push Notification error: undefined HOT 2
- Android: Notification vs Data payload HOT 2
- mutableContent support? HOT 4
- How to push to subscriptions? HOT 2
- Question: Scheduled push HOT 2
- Is there a push operator in loopback similar to mongo $push ? HOT 2
- DataSource For MySQL HOT 2
- How to send notification instead of data when using FCM HOT 4
- Connect timed out error, when and how to reproduce this error or did it reconnect automatically? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loopback-component-push.