Adding * as route for rule

This commit is contained in:
Fabian 2019-09-22 13:13:11 +02:00
parent a7f7edcd0b
commit 3546202907
2 changed files with 3 additions and 3 deletions

View File

@ -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",

View File

@ -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"]