feat(oauth): limited discord server sign-in (#346)

* feat(oauth): limited discord server sign-in

* fix: typo

* style: change undefined to optional

* style: remove conditional operator
This commit is contained in:
Qing Fu
2023-12-01 05:41:06 +08:00
committed by GitHub
parent d9a9523c9a
commit 5f94c7295a
7 changed files with 89 additions and 21 deletions

View File

@@ -180,6 +180,10 @@ const configVariables: ConfigVariables = {
type: "boolean",
defaultValue: "false",
},
"discord-limitedGuild": {
type: "string",
defaultValue: "",
},
"discord-clientId": {
type: "string",
defaultValue: "",
@@ -262,8 +266,8 @@ async function migrateConfigVariables() {
for (const existingConfigVariable of existingConfigVariables) {
const configVariable =
configVariables[existingConfigVariable.category]?.[
existingConfigVariable.name
];
existingConfigVariable.name
];
if (!configVariable) {
await prisma.config.delete({
where: {