mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: getOrganization issue
This commit is contained in:
parent
4aa2d537e1
commit
122c802c62
5 changed files with 23 additions and 9 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue