V8 push notification

From DreamFactory
Jump to: navigation, search
DreamFactoryTutorialsV8 push notification
(Created page with "var name = event.request.body.record[0].name; var msg = { "Message": { "default": "A new Todo named '" + name + "' was just created!" }, "Subject": "New Todo Create...")
(No difference)

Revision as of 18:34, 26 October 2015

var name = event.request.body.record[0].name;

var msg = {

 "Message": {
   "default": "A new Todo named '" + name + "' was just created!"
 },
 "Subject": "New Todo Created"

}

// push to SNS topic by name var result = platform.api.post("push/topic/642246745556:test_topic", msg);

// output result to storage/logs/dreamfactory.log var_dump(result);