We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3b3e91c + a8c8b15 commit 4db0744Copy full SHA for 4db0744
adminforth/types/Back.ts
@@ -92,16 +92,16 @@ export interface IExpressHttpServer extends IHttpServer {
92
* Adds adminUser to request object if user is authorized. Drops request with 401 status if user is not authorized.
93
* @param callable : Function which will be called if user is authorized.
94
*
95
- * Example:
96
+ * @example
97
* ```ts
98
- * expressApp.get('/myApi', authorize((req, res) => \{
+ * expressApp.get('/myApi', authorize((req, res) => {
99
* console.log('User is authorized', req.adminUser);
100
- * res.json(\{ message: 'Hello World' \});
101
- * \}));
+ * res.json({ message: 'Hello World' });
+ * }));
102
* ```
103
104
- */
+ */
105
authorize(callable: Function): void;
106
}
107
0 commit comments