mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: add new org creation page
This commit is contained in:
parent
0c6ec386c2
commit
1b3df392b7
2 changed files with 55 additions and 9 deletions
|
|
@ -15,11 +15,25 @@ export async function getUserOrganizations() {
|
|||
.catch((error) => console.log("error", error));
|
||||
}
|
||||
|
||||
// export async function createNewOrganization(user_id) {}
|
||||
export async function createNewOrganization(body: any) {
|
||||
const HeadersConfig = new Headers({ "Content-Type": "application/json" });
|
||||
|
||||
const requestOptions: any = {
|
||||
method: "POST",
|
||||
headers: HeadersConfig,
|
||||
redirect: "follow",
|
||||
credentials: "include",
|
||||
body: JSON.stringify(body),
|
||||
};
|
||||
|
||||
return fetch(`${getAPIUrl()}orgs/`, requestOptions)
|
||||
.then((result) => result.json())
|
||||
.catch((error) => console.log("error", error));
|
||||
}
|
||||
|
||||
// export async function getOrganizationData(org_id) {}
|
||||
|
||||
export async function deleteOrganizationFromBackend(org_id:any) {
|
||||
export async function deleteOrganizationFromBackend(org_id: any) {
|
||||
const HeadersConfig = new Headers({ "Content-Type": "application/json" });
|
||||
|
||||
const requestOptions: any = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue