@@ -733,7 +733,7 @@ There are set of prepared errors you can use:
733733* UnauthorizedError
734734
735735
736- You can also create and use your own errors by extending ` HttpError ` class.
736+ You can also create and use your own errors by extending ` HttpError ` class.
737737To define the data returned to the client, you could define a toJSON method in your error.
738738
739739``` typescript
@@ -755,7 +755,7 @@ class DbError extends HttpError {
755755 }
756756 }
757757}
758- ```
758+ ```
759759
760760#### Enable CORS
761761
@@ -796,7 +796,7 @@ app.listen(3000);
796796
797797#### Default settings
798798
799- You can override default status code in routing-controllers options.
799+ You can override default status code in routing-controllers options.
800800
801801``` typescript
802802import " reflect-metadata" ;
@@ -809,9 +809,9 @@ const app = createExpressServer({
809809 // with this option, null will return 404 by default
810810 nullResultCode: 404 ,
811811
812- // with this option, void or Promise<void> will return 204 by default
812+ // with this option, void or Promise<void> will return 204 by default
813813 undefinedResultCode: 204 ,
814-
814+
815815 paramOptions: {
816816 // with this option, argument will be required by default
817817 required: true
@@ -1486,7 +1486,8 @@ export class QuestionController {
14861486| `@Patch (route : string \|RegExp )` | `@Patch ("/users /:id ") patch ()` | Methods marked with this decorator will register a request made with PATCH HTTP Method to a given route . In action options you can specify if action should response json or regular text response . | `app .patch ("/users /:id ", patch )` |
14871487| `@Delete (route : string \|RegExp )` | `@Delete ("/users /:id ") delete ()` | Methods marked with this decorator will register a request made with DELETE HTTP Method to a given route . In action options you can specify if action should response json or regular text response . | `app .delete ("/users /:id ", delete )` |
14881488| `@Head (route : string \|RegExp )` | `@Head ("/users /:id ") head ()` | Methods marked with this decorator will register a request made with HEAD HTTP Method to a given route . In action options you can specify if action should response json or regular text response . | `app .head ("/users /:id ", head )` |
1489- | `@Method (methodName : string , route : string \|RegExp )` | `@Method ("move ", "/users /:id ") move ()` | Methods marked with this decorator will register a request made with given `methodName ` HTTP Method to a given route . In action options you can specify if action should response json or regular text response . | `app .move ("/users /:id ", move )` |
1489+ | `@All (route : string \|RegExp )` | `@All ("/users /me ") rewrite ()` | Methods marked with this decorator will register a request made with any HTTP Method to a given route . In action options you can specify if action should response json or regular text response . | `app .all ("/users /me ", rewrite )` |
1490+ | `@Method (methodName : string , route : string \|RegExp )` | `@Method ("move ", "/users /:id ") move ()` | Methods marked with this decorator will register a request made with given `methodName ` HTTP Method to a given route . In action options you can specify if action should response json or regular text response . | `app .move ("/users /:id ", move )` |
14901491
14911492#### Method Parameter Decorators
14921493
0 commit comments