diff --git a/README.md b/README.md index 0985655..e4d5fa1 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,12 @@ example: `"-JoJypAujT2z0qcWnYjW": true` example: `false` +- isPremium [boolean]: has this radio channel been upgraded to premium +This property cannot be changed by the user. After paying the premium +fee, the Firebase functions backend will take care of switching it to `true` + +example: `true` + - link [string]: URL describing the external homepage for a radio channel example: `"https://example.com"` diff --git a/database.rules.json b/database.rules.json index 601e885..285843c 100644 --- a/database.rules.json +++ b/database.rules.json @@ -114,6 +114,9 @@ "isFeatured": { ".validate": "newData.isBoolean() && (data.exists() && newData.val() === data.val() || newData.val() === false)" }, + "isPremium": { + ".validate": "newData.isBoolean() && newData.val() === data.val()" + }, "link": { ".validate": "newData.isString() && newData.val().length < 150" },