Skip to content

Commit a921354

Browse files
committed
docs: improved examles comsistency
1 parent 9a742be commit a921354

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

adminforth/documentation/docs/tutorial/03-Customization/06-customPages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ Open `index.ts` file and add the following code *BEFORE* `admin.express.serve(`
310310
311311
app.get(`${ADMIN_BASE_URL}/api/dashboard/`,
312312
admin.express.authorize(
313-
async (req:IAdminUserExpressRequest, res:any) => {
313+
async (req:IAdminUserExpressRequest, res: express.Response) => {
314314
const days = req.body.days || 7;
315315
const apartsByDays = admin.resource('aparts').dataConnector.client.prepare(
316316
`SELECT

adminforth/documentation/docs/tutorial/03-Customization/08-pageInjections.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Also we have to add an Api to get percentages:
100100
```ts title="./index.ts"
101101
app.get(`${ADMIN_BASE_URL}/api/aparts-by-room-percentages/`,
102102
admin.express.authorize(
103-
async (req: IAdminUserExpressRequest, res) => {
103+
async (req: IAdminUserExpressRequest, res: express.Response) => {
104104
const roomPercentages = await admin.resource('aparts').dataConnector.client.prepare(
105105
`SELECT
106106
number_of_rooms,

adminforth/documentation/docs/tutorial/07-Plugins/01-AuditLog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ If you have a custom, self coded actions in your API, you can log them by callin
163163

164164
app.get(`${ADMIN_BASE_URL}/api/dashboard/`,
165165
admin.express.authorize(
166-
async (req: IAdminUserExpressRequest, res) => {
166+
async (req: IAdminUserExpressRequest, res: express.Response) => {
167167

168168
admin.getPluginByClassName<AuditLogPlugin>('AuditLogPlugin').logCustomAction({
169169
resourceId: 'aparts',

adminforth/documentation/docs/tutorial/07-Plugins/10-i18n.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ And on the backend side you can use tr function to translate the string:
428428
app.get(`${ADMIN_BASE_URL}/api/greeting`,
429429
admin.express.authorize(
430430
admin.express.translatable(
431-
async (req: IAdminUserExpressRequest & ITranslateExpressRequest, res) => {
431+
async (req: IAdminUserExpressRequest & ITranslateExpressRequest, res: express.Response) => {
432432
res.json({
433433
text: await req.tr('Welcome, {name}', 'customApis', { name: req.adminUser.username }),
434434
});

dev-demo/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ app.get(`${ADMIN_BASE_URL}/api/dashboard/`,
464464

465465
app.get(`${ADMIN_BASE_URL}/api/aparts-by-room-percentages/`,
466466
admin.express.authorize(
467-
async (req: IAdminUserExpressRequest, res: express.response) => {
467+
async (req: IAdminUserExpressRequest, res: express.Response) => {
468468
const roomPercentages = await admin.resource('aparts').dataConnector.client.prepare(
469469
`SELECT
470470
number_of_rooms,

0 commit comments

Comments
 (0)