fix: getOrganization issue

This commit is contained in:
swve 2023-08-31 19:07:53 +02:00
parent 4aa2d537e1
commit 122c802c62
5 changed files with 23 additions and 9 deletions

View file

@ -24,7 +24,22 @@ export async function getOrganizationContextInfo(org_slug: any, next: any) {
return res;
}
export async function getOrganizationContextInfoWithoutCredentials(org_slug: any, next: any) {
let HeadersConfig = new Headers({ "Content-Type": "application/json" });
let options: any = {
method: 'GET',
headers: HeadersConfig,
redirect: "follow",
// Next.js
next: next,
};
const result = await fetch(`${getAPIUrl()}orgs/slug/${org_slug}`, options);
const res = await errorHandling(result);
return res;
}
export function getOrganizationContextInfoNoAsync(org_slug: any, next: any) {
const result = fetch(`${getAPIUrl()}orgs/slug/${org_slug}`, RequestBody("GET", null, next));
return result;
}
}