瀏覽代碼

restore midleware

zahmis 5 年之前
父節點
當前提交
5be07fb18f
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/server/routes/apiv3/slack-integration-settings.js

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

@@ -258,7 +258,7 @@ module.exports = (crowi) => {
    *          200:
    *          200:
    *            description: Succeeded to update access token for slack
    *            description: Succeeded to update access token for slack
    */
    */
-  router.put('/access-tokens', /*  loginRequiredStrictly, adminRequired, csrf, */ async(req, res) => {
+  router.put('/access-tokens', loginRequiredStrictly, adminRequired, csrf, async(req, res) => {
     const SlackAppIntegration = mongoose.model('SlackAppIntegration');
     const SlackAppIntegration = mongoose.model('SlackAppIntegration');
 
 
     let checkTokens;
     let checkTokens;
@@ -266,8 +266,8 @@ module.exports = (crowi) => {
     let tokenPtoG;
     let tokenPtoG;
     do {
     do {
       // TODO imple generate tokens at GW-5859. The following tokens is temporary.
       // TODO imple generate tokens at GW-5859. The following tokens is temporary.
-      tokenGtoP = 'first';
-      tokenPtoG = 'first';
+      tokenGtoP = 'v2';
+      tokenPtoG = 'v2';
       // eslint-disable-next-line no-await-in-loop
       // eslint-disable-next-line no-await-in-loop
       checkTokens = await SlackAppIntegration.findOne({ $or: [{ tokenGtoP }, { tokenPtoG }] });
       checkTokens = await SlackAppIntegration.findOne({ $or: [{ tokenGtoP }, { tokenPtoG }] });
     } while (checkTokens);
     } while (checkTokens);