Skip to content

Commit

Permalink
feat: Add channel:read:subscriptions scope (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
skarab42 authored Feb 28, 2021
1 parent 0385b3a commit 6328118
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
10 changes: 1 addition & 9 deletions app/server/db/seeders/20201212134826-default-settings.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
const setting = require("../setting");

const scope = [
"user:read:email",
"chat:read",
"chat:edit",
"channel:read:redemptions",
"channel:manage:redemptions",
"bits:read",
];
const scope = require("../twitch-scopes");

module.exports = {
up: async ({ context }) => {
Expand Down
14 changes: 14 additions & 0 deletions app/server/db/seeders/20210228083955-add-twitch-sub-scope.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const scope = require("../twitch-scopes");
const Setting = require("../Models/Setting");

const newScope = [...scope, "channel:read:subscriptions"];

module.exports = {
up: async () => {
await Setting.update(
{ value: JSON.stringify(newScope) },
{ where: { key: "twitch.scope" } }
);
},
down: async () => {},
};
8 changes: 8 additions & 0 deletions app/server/db/twitch-scopes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = [
"user:read:email",
"chat:read",
"chat:edit",
"channel:read:redemptions",
"channel:manage:redemptions",
"bits:read",
];

0 comments on commit 6328118

Please sign in to comment.