diff --git a/src/components/SponsorTimeEditComponent.tsx b/src/components/SponsorTimeEditComponent.tsx index dab25dd4..17014882 100644 --- a/src/components/SponsorTimeEditComponent.tsx +++ b/src/components/SponsorTimeEditComponent.tsx @@ -406,7 +406,10 @@ class SponsorTimeEditComponent extends React.Component, /* Contains unsubmitted segments that the user has created. */ unsubmittedSegments: Record, defaultCategory: Category, @@ -133,7 +137,7 @@ const Config: SBObject = { syncDefaults: { userID: null, isVip: false, - canSubmitChapter: false, + permissions: {}, unsubmittedSegments: {}, defaultCategory: "chooseACategory" as Category, renderSegmentsAsChapters: true, diff --git a/src/popup.ts b/src/popup.ts index 7b553d96..061634c2 100644 --- a/src/popup.ts +++ b/src/popup.ts @@ -255,7 +255,7 @@ async function runThePopup(messageListener?: MessageListener): Promise { PageElements.showNoticeAgain.style.display = "unset"; } - utils.sendRequestToServer("GET", "/api/userInfo?value=userName&value=viewCount&value=minutesSaved&value=vip&value=canSubmitChapter&userID=" + utils.sendRequestToServer("GET", "/api/userInfo?value=userName&value=viewCount&value=minutesSaved&value=vip&value=permissions&userID=" + Config.config.userID, (res) => { if (res.status === 200) { const userInfo = JSON.parse(res.responseText); @@ -285,7 +285,7 @@ async function runThePopup(messageListener?: MessageListener): Promise { } Config.config.isVip = userInfo.vip; - Config.config.canSubmitChapter = userInfo.canSubmitChapter; + Config.config.permissions = userInfo.permissions; } });