AfterDataSourceResponseFunction()
AfterDataSourceResponseFunction: (
params
) =>Promise
<object
>
Modify response to change how data is returned after fetching from database. Return ok: false and error: string to stop execution and show error message to user. Return ok: true to continue execution.
Parameters
Parameter | Type |
---|---|
params | object |
params.adminUser | AdminUser |
params.adminforth | IAdminForth |
params.extra | object |
params.extra.body | any |
params.extra.cookies | object [] |
params.extra.headers | Record <string , string > |
params.extra.query | Record <string , string > |
params.resource | AdminForthResource |
params.response | any |
Returns
Promise
<object
>
error?
optional
error:string
ok
ok:
boolean