adminjs icon indicating copy to clipboard operation
adminjs copied to clipboard

get page : api client: pass parameter

Open faroukbouzouita opened this issue 2 years ago • 0 comments

Hello , I need to pass a parameter from my custom page to the handle function using the apiclient class and the get page function at the level of this function I cannot pass any parameter or query how can I get around this problem?

faroukbouzouita avatar Jun 27 '22 23:06 faroukbouzouita

You can use either data or params:

const api = new ApiClient()
api.getPage({
  pageName: 'xxx',
  data: { test: 123 }, // visible in request.payload in handler
})

dziraf avatar Sep 13 '22 11:09 dziraf