The get a "request timeout" error in the logs. I do have OneSignal referenced as my push adapter in my index.js file as well. I also seen in the parse-server docs for Push that if you are using any kind of Push Adapter, that you need to make sure it has "send(data, installations)" ? Do I need to reference that somewhere ? And if so, then where would I put that?
Hi, I cant seem to be able to send pushes using OneSignal in my cloud code. I can send pushes from the dashboard though. Here is my cloud code: `
Parse.Cloud.define("sendPush", (req, res) { send = function(params) {
var promise = new Parse.Promise();
var jsonBody = { app_id: "5eb5a37e-b458-11e3-ac11-000c2940e62c", included_segments: ["All"], contents: {en: "English Message"}, data: {foo: "bar"} }; Parse.Cloud.httpRequest({ method: "POST", url: "https://onesignal.com/api/v1/notifications", headers: { "Content-Type": "application/json;charset=utf-8", "Authorization": "Basic NGEwMGZmMjItY2NkNy0xMWUzLTk5ZDUtMDAwYzI5NDBlNjJj" }, body: JSON.stringify(jsonBody) }).then(function (httpResponse) { promise.resolve(httpResponse) }, function (httpResponse) { promise.reject(httpResponse); }); return promise; }; exports.send = send; });`
The get a "request timeout" error in the logs. I do have OneSignal referenced as my push adapter in my index.js file as well. I also seen in the parse-server docs for Push that if you are using any kind of Push Adapter, that you need to make sure it has "send(data, installations)" ? Do I need to reference that somewhere ? And if so, then where would I put that?