You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1215,7 +1243,7 @@ If you want to disable it simply pass `classTransformer: false` to createExpress
1215
1243
1216
1244
## Controller Inheritance
1217
1245
1218
-
Often your application may need to have an option to inherit controller from another to reuse code and void duplication.
1246
+
Often your application may need to have an option to inherit controller from another to reuse code and avoid duplication.
1219
1247
A good example of the use is the CRUD operations which can be hidden inside `AbstractBaseController` with the possibility to add new and overload methods, the template method pattern.
1220
1248
1221
1249
```typescript
@@ -1227,7 +1255,7 @@ abstract class AbstractControllerTemplate {
1227
1255
@Post()
1228
1256
public create() {}
1229
1257
1230
-
@Read()
1258
+
@Get()
1231
1259
public read() {}
1232
1260
1233
1261
@Put()
@@ -1385,16 +1413,17 @@ Here is example how to integrate routing-controllers with [typedi](https://githu
|`@Authorized(roles?: string\|string[])`|`@Authorized("SUPER_ADMIN")` get() | Checks if user is authorized and has given roles on a given route. `authorizationChecker` should be defined in routing-controllers options. ||
1567
+
|`@Authorized(roles?: string\|string[])`|`@Authorized("SUPER_ADMIN")` get() | Checks if user is authorized and has given roles on a given route. `authorizationChecker` should be defined in routing-controllers options. |
1539
1568
|`@CurrentUser(options?: { required?: boolean })`| get(@CurrentUser({ required: true }) user: User) | Injects currently authorized user. `currentUserChecker` should be defined in routing-controllers options. |
1540
1569
|`@Header(headerName: string, headerValue: string)`|`@Header("Cache-Control", "private")` get() | Allows to explicitly set any HTTP header returned in the response. |
1541
1570
|`@ContentType(contentType: string)`|`@ContentType("text/csv")` get() | Allows to explicitly set HTTP Content-Type returned in the response. |
0 commit comments