Просмотр исходного кода

rename non-proxy to without-proxy

Shun Miyazawa 5 лет назад
Родитель
Сommit
9cdc209f35

+ 1 - 1
resource/locales/en_US/admin/admin.json

@@ -257,7 +257,7 @@
       "discard": "Discard",
       "discard": "Discard",
       "generate": "Generate"
       "generate": "Generate"
     },
     },
-    "custom_bot_without_proxy_settings": "Custom bot (non-proxy) Settings",
+    "custom_bot_without_proxy_settings": "Custom bot (without-proxy) Settings",
     "without_proxy": {
     "without_proxy": {
       "create_bot": "Create Bot"
       "create_bot": "Create Bot"
     }
     }

+ 1 - 1
resource/locales/ja_JP/admin/admin.json

@@ -255,7 +255,7 @@
       "discard": "破棄",
       "discard": "破棄",
       "generate": "発行"
       "generate": "発行"
     },
     },
-    "custom_bot_without_proxy_settings": "Custom bot (non-proxy) 設定",
+    "custom_bot_without_proxy_settings": "Custom bot (without-proxy) 設定",
     "without_proxy": {
     "without_proxy": {
       "create_bot": "Bot を作成する"
       "create_bot": "Bot を作成する"
     }
     }

+ 1 - 1
resource/locales/zh_CN/admin/admin.json

@@ -265,7 +265,7 @@
       "discard": "丢弃",
       "discard": "丢弃",
       "generate": "生成"
       "generate": "生成"
     },
     },
-    "custom_bot_without_proxy_settings": "Custom bot (non-proxy) 设置",
+    "custom_bot_without_proxy_settings": "Custom bot (without-proxy) 设置",
     "without_proxy": {
     "without_proxy": {
       "create_bot": "创建 Bot"
       "create_bot": "创建 Bot"
     }
     }

+ 2 - 2
src/client/js/components/Admin/SlackIntegration/CustomBotNonProxySettings.jsx

@@ -14,7 +14,7 @@ const CustomBotWithoutProxySettings = (props) => {
   const [slackBotToken, setSlackBotToken] = useState('');
   const [slackBotToken, setSlackBotToken] = useState('');
   const [slackSigningSecretEnv, setSlackSigningSecretEnv] = useState('');
   const [slackSigningSecretEnv, setSlackSigningSecretEnv] = useState('');
   const [slackBotTokenEnv, setSlackBotTokenEnv] = useState('');
   const [slackBotTokenEnv, setSlackBotTokenEnv] = useState('');
-  const botType = 'non-proxy';
+  const botType = 'without-proxy';
 
 
   const fetchData = useCallback(async() => {
   const fetchData = useCallback(async() => {
     try {
     try {
@@ -38,7 +38,7 @@ const CustomBotWithoutProxySettings = (props) => {
 
 
   async function updateHandler() {
   async function updateHandler() {
     try {
     try {
-      await appContainer.apiv3.put('/slack-integration/custom-bot-non-proxy', {
+      await appContainer.apiv3.put('/slack-integration/custom-bot-without-proxy', {
         slackSigningSecret,
         slackSigningSecret,
         slackBotToken,
         slackBotToken,
         botType,
         botType,

+ 3 - 3
src/server/routes/apiv3/slack-integration.js

@@ -95,11 +95,11 @@ module.exports = (crowi) => {
   /**
   /**
    * @swagger
    * @swagger
    *
    *
-   *    /slack-integration/custom-bot-non-proxy/:
+   *    /slack-integration/custom-bot-without-proxy/:
    *      put:
    *      put:
    *        tags: [CustomBotWithoutProxy]
    *        tags: [CustomBotWithoutProxy]
    *        operationId: putCustomBotWithoutProxy
    *        operationId: putCustomBotWithoutProxy
-   *        summary: /slack-integration/custom-bot-non-proxy
+   *        summary: /slack-integration/custom-bot-without-proxy
    *        description: Put customBotWithoutProxy setting.
    *        description: Put customBotWithoutProxy setting.
    *        requestBody:
    *        requestBody:
    *          required: true
    *          required: true
@@ -111,7 +111,7 @@ module.exports = (crowi) => {
    *           200:
    *           200:
    *             description: Succeeded to put CustomBotWithoutProxy setting.
    *             description: Succeeded to put CustomBotWithoutProxy setting.
    */
    */
-  router.put('/custom-bot-non-proxy',
+  router.put('/custom-bot-without-proxy',
     accessTokenParser, loginRequiredStrictly, adminRequired, csrf, validator.CusotmBotWithoutProxy, apiV3FormValidator, async(req, res) => {
     accessTokenParser, loginRequiredStrictly, adminRequired, csrf, validator.CusotmBotWithoutProxy, apiV3FormValidator, async(req, res) => {
       const { slackSigningSecret, slackBotToken, botType } = req.body;
       const { slackSigningSecret, slackBotToken, botType } = req.body;
 
 

+ 1 - 1
src/server/service/config-loader.js

@@ -412,7 +412,7 @@ const ENV_VAR_NAME_TO_CONFIG_INFO = {
   },
   },
   SLACK_BOT_TYPE: {
   SLACK_BOT_TYPE: {
     ns:      'crowi',
     ns:      'crowi',
-    key:     'slackbot:type', // eg. official || custom-non-proxy || custom-with-proxy
+    key:     'slackbot:type', // eg. official || custom-without-proxy || custom-with-proxy
     type:    TYPES.STRING,
     type:    TYPES.STRING,
     default: null,
     default: null,
   },
   },