I don’t quite understand server side scripting,
I know theres documentation for this, but got problems getting through.
Just want very simple script.
When user add data to table A (through restAPI),
then get part data of that call and put it into another. (Notifications)
So I thought it’ll be simple as that:
if (event.response.record.lenght) {
_.each(event.response.record, function(record, index, list) {
var data = {“to”: record.to, “type”: 1, “set”: record.plan_id, “who”: record.user_id};
platform.api.post(“plansth.notifies”, data);
});
}
plansth is app and service name, the rest lok quite obvious.
Where did I go wrong?