File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -733,10 +733,10 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
733733 'edit' : 'show' ,
734734 } [ source ] ;
735735
736- for ( const hook of listify ( resource . hooks ?. [ hookSource ] ?. beforeDatasourceRequest ) ) {
736+ for ( const hook of listify ( resource . hooks ?. [ hookSource ] ?. beforeDatasourceRequest as BeforeDataSourceRequestFunction [ ] ) ) {
737737 const filterTools = filtersTools . get ( body ) ;
738738 body . filtersTools = filterTools ;
739- const resp = await hook ( {
739+ const resp = await ( hook as BeforeDataSourceRequestFunction ) ( {
740740 resource,
741741 query : body ,
742742 adminUser,
Original file line number Diff line number Diff line change @@ -515,6 +515,7 @@ export type BeforeDataSourceRequestFunction = (params: {
515515 cookies : Record < string , string > ,
516516 requestUrl : string ,
517517 } ,
518+ filtersTools : any ,
518519 adminforth : IAdminForth ,
519520} ) => Promise < {
520521 ok : boolean ,
You can’t perform that action at this time.
0 commit comments