panarama360/ts-telegraf-decorators

How to use Middleware?

Closed this issue · 1 comments

How to use Middleware?

figured it out

class Middleware {
    use(ctx: ContextMessageUpdate | Context, next: (...args: any[]) => Promise<any>){
        ...
    }
}

@UseMiddleware(Middleware)
class Controller {
    ...
}