routing-controllers
routing-controllers copied to clipboard
Create structured, declarative and beautifully organized class-based controllers with heavy decorators usage in Express / Koa using TypeScript and Routing Controllers Framework.
![image](https://user-images.githubusercontent.com/48635933/110481202-43206600-8122-11eb-8bb9-76cee42590f0.png) ![image](https://user-images.githubusercontent.com/48635933/110481250-53384580-8122-11eb-9972-79cf422ecba4.png)
As we can assume, `@UseBefor` should be executed BEFORE method invocation, but unfortunately is executed BEFORE any other middleware which makes no sense and prevents using it as a kind...
Used the `UnauthorizedError` exception in my controller, it returns the correct error message, but the status code is wrong, returns 200 instead of 404
I have a controller method decorated with `@Redirect("https://some.where/?:id")` that returns an object that interpolates id of the mentioned string. The problem is when I try to run a test (Jest/Supertest...
``` function RejectAlways(){ return createParamDecorator({ required: true, value: action =>{ } }) } @JsonController() export class TestController { @Get("/test") public async GetTest(@RejectAlways() someValue:String){ return {status:"All good chief"}; } } ```...
redirect not working with interceptor class: Interceptor class: ```typescript @Interceptor() export class Json implements InterceptorInterface { intercept(action: Action, content: any) { const { statusCode } = action.response; return { httpCode:...
When use `@Render` in Koa, it will break all api request, all API request will return a html template. ## How to produce 1. Create a html render controller ```...
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.13.1 to 1.14.8. Commits 3d81dc3 Release version 1.14.8 of the npm package. 62e546a Drop confidential headers across schemes. 2ede36d Release version 1.14.7 of the npm package. 8b347cb...
``` @Controller() @UseBefore(UserMiddleware) @UseAfter(AdminMiddleware) export class AdminController { @Get('/users') @UseBefore(ActionMiddleware) getAll() { console.log("Admin controller "); return 'This action returns all admin user'; } ``` Is it possible to skip the...
## Description Before middlewares should be executed before specific endpoint, not before default middleware ## Checklist - [ ] the pull request title describes what this PR does (not a...