1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-15 16:10:06 +00:00

chore(refactor): only fetch job if streaming logs, fix tests, add JSDoc comments

This commit is contained in:
Krishna Acondy
2021-07-21 08:12:34 +01:00
parent df9c1c643f
commit cfa0c8b9af
5 changed files with 60 additions and 48 deletions

View File

@@ -2,6 +2,14 @@ import { prefixMessage } from '@sasjs/utils/error'
import { RequestClient } from '../../request/RequestClient'
import { convertToCSV } from '../../utils/convertToCsv'
/**
* Uploads tables to SAS as specially formatted CSVs.
* This is more compact than JSON, and easier to read within SAS.
* @param requestClient - the pre-configured HTTP request client
* @param data - the JSON representation of the data to be uploaded
* @param accessToken - an optional access token for authentication/authorization
* The access token is not required when uploading tables from the browser.
*/
export async function uploadTables(
requestClient: RequestClient,
data: any,