# UseAfter Decorator

Module
import { UseAfter } from "@tsed/common"
Source/packages/common/src/mvc/decorators/method/useAfter.ts

# Overview

function UseAfter(...args: any[]): Function;

# Description

Mounts the specified middleware function or functions at the specified path: the middleware function is executed when the base of the requested path matches `path.

@Controller('/')
@UseAfter(Middleware1)
export class Ctrl {

   @Get('/')
   @UseAfter(Middleware2)
   get() { }
}
1
2
3
4
5
6
7
8