Adding * as route for rule
This commit is contained in:
parent
a7f7edcd0b
commit
3546202907
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@hibas123/realtime-db",
|
"name": "@hibas123/realtimedb",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
@ -40,4 +40,4 @@
|
|||||||
"shortid": "^2.2.15",
|
"shortid": "^2.2.15",
|
||||||
"socket.io": "^2.2.0"
|
"socket.io": "^2.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -64,7 +64,7 @@ export class Rules {
|
|||||||
let rules = this.rules;
|
let rules = this.rules;
|
||||||
|
|
||||||
for (let segment of path) {
|
for (let segment of path) {
|
||||||
rules = rules[segment];
|
rules = rules[segment] || rules["*"];
|
||||||
if (rules) {
|
if (rules) {
|
||||||
if (rules[".read"]) {
|
if (rules[".read"]) {
|
||||||
read = rules[".read"]
|
read = rules[".read"]
|
||||||
|
Reference in New Issue
Block a user