Skip to content

Instantly share code, notes, and snippets.

View anvarazizov's full-sized avatar

Anvar Azizov anvarazizov

View GitHub Profile
@anvarazizov
anvarazizov / main.js
Created August 28, 2015 11:40
main file for Cloud code
Parse.Cloud.beforeSave("Photo", function(request, response) {
console.log("version is:" + request.object.get("version"));
var version = request.object.get("version");
if (version == null && version == undefined ) {
version = 0;
}
version += 1;
console.log("version is:" + version);
@anvarazizov
anvarazizov / part of main.js
Last active August 28, 2015 11:42
Parse job example for sending push notification
Parse.Cloud.job("sendPush", function(request, status) {
Parse.Push.send({
channels: ["global"],
data:
{
"alert": "Update process has started",
"content-available":"1",
}
},
{