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

Commit 24cc610

Browse files
committed
Allow for "image" property on channel models
1 parent 697b0cc commit 24cc610

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

database.rules.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,6 @@
9797
".write": "auth != null && (root.child('users').child(auth.uid).child('channels').child($channelID).exists() || (!data.exists() && !root.child('users').child(auth.uid).child('channels').exists()))",
9898
".validate": "newData.hasChildren(['slug', 'title', 'created']) || !newData.exists()",
9999

100-
"body": {
101-
".validate": "newData.isString() && newData.val().length < 300"
102-
},
103100
"channelPublic": {
104101
".validate": "newData.isString() && root.child('channelPublics').child(newData.val()).child('channel').val() == $channelID"
105102
},
@@ -128,6 +125,9 @@
128125
"title": {
129126
".validate": "newData.isString() && newData.val().length > 2 && newData.val().length < 32"
130127
},
128+
"body": {
129+
".validate": "newData.isString() && newData.val().length < 300"
130+
},
131131
"tracks": {
132132
"$track": {
133133
".validate": "root.child('tracks').hasChild($track) && root.child('tracks').child($track).child('channel').val() === $channelID"
@@ -138,6 +138,9 @@
138138
".validate": "root.child('channels').child($favoriteChannel).exists()"
139139
}
140140
},
141+
"image": {
142+
".validate": "newData.isString()"
143+
},
141144
"images": {
142145
"$image": {
143146
".validate": "root.child('images').hasChild($image) && root.child('images').child($image).child('channel').val() === $channelID"

0 commit comments

Comments
 (0)