UNPKG

@adonisjs-community/girouette

Version:

An AdonisJS package allowing decorators-based routing.

18 lines (17 loc) 545 B
import { MiddlewareFn, OneOrMore, ParsedNamedMiddleware } from '@adonisjs/core/types/http'; /** * The GroupMiddleware decorator allows you to apply middleware to all routes within * a controller. * * @param middleware Middleware to apply to all routes * * @example * ```ts * @GroupMiddleware([middleware.auth()]) * export default class AdminController { * @Get('/dashboard') * index() {} * } * ``` */ export declare const GroupMiddleware: (middleware: OneOrMore<MiddlewareFn | ParsedNamedMiddleware>) => (target: any) => void;