@@ -733,7 +733,7 @@ There are set of prepared errors you can use:
733
733
* UnauthorizedError
734
734
735
735
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.
737
737
To define the data returned to the client, you could define a toJSON method in your error.
738
738
739
739
``` typescript
@@ -755,7 +755,7 @@ class DbError extends HttpError {
755
755
}
756
756
}
757
757
}
758
- ```
758
+ ```
759
759
760
760
#### Enable CORS
761
761
@@ -796,7 +796,7 @@ app.listen(3000);
796
796
797
797
#### Default settings
798
798
799
- You can override default status code in routing-controllers options.
799
+ You can override default status code in routing-controllers options.
800
800
801
801
``` typescript
802
802
import " reflect-metadata" ;
@@ -809,9 +809,9 @@ const app = createExpressServer({
809
809
// with this option, null will return 404 by default
810
810
nullResultCode: 404 ,
811
811
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
813
813
undefinedResultCode: 204 ,
814
-
814
+
815
815
paramOptions: {
816
816
// with this option, argument will be required by default
817
817
required: true
@@ -1486,7 +1486,8 @@ export class QuestionController {
1486
1486
| `@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 )` |
1487
1487
| `@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 )` |
1488
1488
| `@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 )` |
1490
1491
1491
1492
#### Method Parameter Decorators
1492
1493
0 commit comments