Skip to content

UseAfter

@tsed/platform-middlewares

Usage

typescript
import { UseAfter } from "@tsed/platform-middlewares";

See /packages/platform/platform-middlewares/src/types/decorators/useAfter.ts.

Overview

ts
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.

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

   @Get('/')
   @UseAfter(Middleware2)
   get() { }
}

Released under the MIT License.