Skip to content
This repository was archived by the owner on Mar 2, 2021. It is now read-only.

Commit 74f05f4

Browse files
committed
Update rules to allow timestamps again
1 parent 93b893e commit 74f05f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

database.rules.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@
104104
".validate": "newData.isString() && root.child('channelPublics').child(newData.val()).child('channel').val() == $channelID"
105105
},
106106
"created": {
107-
// Ensure type::timestamp and that you can not update it
108-
".validate": "data.exists() && data.val() === newData.val() || newData.val() == now"
107+
// Ensure type::number and that you can not update it
108+
".validate": "data.exists() && data.val() === newData.val() || newData.val() > now - 1000"
109109
},
110110
"updated": {
111111
// Ensure type::number and that you can not update it
@@ -125,7 +125,7 @@
125125
".validate": "newData.isString() && newData.val().length > 2 && newData.val().length < 100"
126126
},
127127
"title": {
128-
".validate": "newData.isString() && newData.val().length > 2 && newData.val().length < 33"
128+
".validate": "newData.isString() && newData.val().length > 2 && newData.val().length < 32"
129129
},
130130
"tracks": {
131131
"$track": {

0 commit comments

Comments
 (0)