Explorar el Código

validation & swagger

itizawa hace 6 años
padre
commit
a5a4b74f80
Se han modificado 1 ficheros con 8 adiciones y 0 borrados
  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