File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ const textEventHandler = async (event: WebhookEvent): Promise<MessageAPIResponse
43
43
} ;
44
44
45
45
// Register the LINE middleware.
46
- // As an alternative, you could also pass the middleware in the route handler.
47
- app . use ( middleware ( middlewareConfig ) ) ;
46
+ // As an alternative, you could also pass the middleware in the route handler, which is what is used here .
47
+ // app.use(middleware(middlewareConfig));
48
48
49
49
// Route handler to receive webhook events.
50
50
// This route is used to receive connection tests.
@@ -61,6 +61,7 @@ app.get(
61
61
// This route is used for the Webhook.
62
62
app . post (
63
63
'/webhook' ,
64
+ middleware ( middlewareConfig ) ,
64
65
async ( req : Request , res : Response ) : Promise < Response > => {
65
66
const events : WebhookEvent [ ] = req . body . events ;
66
67
You can’t perform that action at this time.
0 commit comments