This commit is contained in:
@@ -74,6 +74,9 @@ async function ayGetTranslations(keys) {
|
||||
//
|
||||
async function ayGetFromAPI(route, token) {
|
||||
token = token || AYMETA.ayClientMetaData.Authorization;
|
||||
if(route && !route.startsWith("http")){
|
||||
route = AYMETA.ayServerMetaData.ayApiUrl + route;
|
||||
}
|
||||
try {
|
||||
let r = await fetch(route, {
|
||||
method: "get",
|
||||
@@ -98,6 +101,9 @@ async function ayGetFromAPI(route, token) {
|
||||
//
|
||||
async function ayPostToAPI(route, data, token) {
|
||||
token = token || AYMETA.ayClientMetaData.Authorization;
|
||||
if(route && !route.startsWith("http")){
|
||||
route = AYMETA.ayServerMetaData.ayApiUrl + route;
|
||||
}
|
||||
try {
|
||||
fetchOptions = {
|
||||
method: "post",
|
||||
|
||||
Reference in New Issue
Block a user