itizawa 6 лет назад
Родитель
Сommit
a5a4b74f80
1 измененных файлов с 8 добавлено и 0 удалено
  1. 8 0
      src/server/routes/apiv3/security-setting.js

+ 8 - 0
src/server/routes/apiv3/security-setting.js

@@ -65,11 +65,13 @@ const validator = {
     body('isSameUsernameTreatedAsIdenticalUser').isBoolean(),
   ],
   githubOAuth: [
+    body('isGithubOAuthEnabled').isBoolean(),
     body('githubClientId').isString(),
     body('githubClientSecret').isString(),
     body('isSameUsernameTreatedAsIdenticalUser').isBoolean(),
   ],
   twitterOAuth: [
+    body('isTwitterOAuthEnabled').isBoolean(),
     body('twitterConsumerKey').isString(),
     body('twitterConsumerSecret').isString(),
     body('isSameUsernameTreatedAsIdenticalUser').isBoolean(),
@@ -231,6 +233,9 @@ const validator = {
  *            description: local account automatically linked the email matched
  *      GoogleOAuthSetting:
  *        type:object
+ *          isGithubOAuthEnabled:
+ *            type: boolean
+ *            description: whether to enable github oauth
  *          googleClientId:
  *            type: string
  *            description: key of comsumer
@@ -241,6 +246,9 @@ const validator = {
  *            type: boolean
  *            description: local account automatically linked the email matched
  *      TwitterOAuthSetting:
+ *          isTwitterOAuthEnabled:
+ *            type: boolean
+ *            description: whether to enable twitter oauth
  *        type:object
  *          twitterConsumerKey:
  *            type: string