This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user