feat: 针对 discord 登录配置使用新版设置方案

This commit is contained in:
StageDog
2025-11-22 19:06:53 +08:00
parent 352801cd35
commit cf8d4e874d
7 changed files with 44 additions and 36 deletions

View File

@@ -71,8 +71,8 @@ func UpdateOption(c *gin.Context) {
})
return
}
case "DiscordOAuthEnabled":
if option.Value == "true" && common.DiscordClientId == "" {
case "discord.enabled":
if option.Value == "true" && system_setting.GetDiscordSettings().ClientId == "" {
c.JSON(http.StatusOK, gin.H{
"success": false,
"message": "无法启用 Discord OAuth请先填入 Discord Client Id 以及 Discord Client Secret",