Skip to content

Instantly share code, notes, and snippets.

@makaroni4
Last active December 20, 2018 21:02
Show Gist options
  • Save makaroni4/11977820558ea9e93d6bc99f944d4b88 to your computer and use it in GitHub Desktop.
Save makaroni4/11977820558ea9e93d6bc99f944d4b88 to your computer and use it in GitHub Desktop.
Config incremental counter via Firebase Realtime Database
{
"rules": {
".read": false,
".write": false,
"incremental_counter": {
".validate": "newData.isNumber() && newData.val() === data.val() + 1",
".read": true,
".write": true
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment