This commit is contained in:
2020-09-08 22:53:19 +00:00
parent d41046eba6
commit af9263649a
8 changed files with 63 additions and 18 deletions

View File

@@ -264,13 +264,16 @@ The ayGetFromAPI function works with GET routes in the API:
```async function ayGetFromAPI(route, token) {...```
The `token` parameter is optional and if not provided will be set by default to the current User's access token.
*POST*
The ayPostToAPI function works with POST routes in the API:
```async function ayPostToAPI(route, token, data) {...```
```async function ayPostToAPI(route, data, token) {...```
The `token` parameter is optional and if not provided will be set by default to the current User's access token.
*Parameters*
@@ -298,8 +301,7 @@ async function ayPrepareData(reportData) {
reportData.myData=
{
ServerInfo:await ayGetFromAPI(
route,
reportData.ayClientMetaData.Authorization
route
)
};
@@ -311,8 +313,7 @@ async function ayPrepareData(reportData) {
let searchPostData={phrase: "Fish"};
reportData.myData.SearchResults = await ayPostToAPI(
route,
reportData.ayClientMetaData.Authorization,
route,
searchPostData
);
return reportData;