Re-working the API library functions and files
This commit is contained in:
@@ -299,6 +299,7 @@ async function handle_download_export__obj_type(
|
||||
return_file=true,
|
||||
filename='no_filename.csv',
|
||||
auto_download=false,
|
||||
limit=5000,
|
||||
params={}, // key value object is expected
|
||||
log_lvl=0
|
||||
} : {
|
||||
@@ -310,6 +311,7 @@ async function handle_download_export__obj_type(
|
||||
return_file?: boolean,
|
||||
filename?: string,
|
||||
auto_download?: boolean,
|
||||
limit?: number,
|
||||
params?: key_val,
|
||||
log_lvl?: number
|
||||
}
|
||||
@@ -332,6 +334,10 @@ async function handle_download_export__obj_type(
|
||||
let clean_filename = filename.replace(/[^a-zA-Z0-9\[\]-_.]/gi, '_');
|
||||
// let clean_filename = filename.replace(/[^a-zA-Z0-9\[\]-\._ ]/gi, '_');
|
||||
|
||||
if (limit >= 0) {
|
||||
params['limit'] = limit;
|
||||
}
|
||||
|
||||
ae_promises.download__sponsorship_export_file = await api.get_object({api_cfg: api_cfg, endpoint: endpoint, params: params, return_blob: return_file, filename: clean_filename, auto_download: auto_download, log_lvl: log_lvl});
|
||||
|
||||
console.log('ae_promises.download__sponsorship_export_file:', ae_promises.download__sponsorship_export_file);
|
||||
|
||||
Reference in New Issue
Block a user