Browse Source

fix indent

Yuki Takei 3 years ago
parent
commit
51726d80db
1 changed files with 18 additions and 18 deletions
  1. 18 18
      apps/slackbot-proxy/src/middlewares/slack-to-growi/authorizer.ts

+ 18 - 18
apps/slackbot-proxy/src/middlewares/slack-to-growi/authorizer.ts

@@ -77,31 +77,31 @@ export class AuthorizeInteractionMiddleware implements IMiddleware {
     this.logger = loggerFactory('slackbot-proxy:middlewares:AuthorizeInteractionMiddleware');
   }
 
-    @Inject()
+  @Inject()
     installerService: InstallerService;
 
-    async use(@Req() req: SlackOauthReq, @Res() res:Res, @Next() next: Next): Promise<void|Res> {
+  async use(@Req() req: SlackOauthReq, @Res() res:Res, @Next() next: Next): Promise<void|Res> {
 
-      if (req.interactionPayload == null) {
-        return next(createError(400, 'The request has no payload.'));
-      }
+    if (req.interactionPayload == null) {
+      return next(createError(400, 'The request has no payload.'));
+    }
 
-      const payload = req.interactionPayload;
+    const payload = req.interactionPayload;
 
-      // extract id from body.payload
-      const teamId = payload.team?.id;
-      const enterpriseId = payload.enterprise?.id;
-      const isEnterpriseInstall = payload.is_enterprise_install === 'true';
+    // extract id from body.payload
+    const teamId = payload.team?.id;
+    const enterpriseId = payload.enterprise?.id;
+    const isEnterpriseInstall = payload.is_enterprise_install === 'true';
 
-      const query: InstallationQuery<boolean> = {
-        teamId,
-        enterpriseId,
-        isEnterpriseInstall,
-      };
+    const query: InstallationQuery<boolean> = {
+      teamId,
+      enterpriseId,
+      isEnterpriseInstall,
+    };
 
-      const commonMiddleware = getCommonMiddleware(query, this.installerService, this.logger);
-      await commonMiddleware(req, res, next);
-    }
+    const commonMiddleware = getCommonMiddleware(query, this.installerService, this.logger);
+    await commonMiddleware(req, res, next);
+  }
 
 }
 @Middleware()