fix: activitiy issues

This commit is contained in:
swve 2023-12-14 00:10:15 +01:00
parent 669270441b
commit 53f40f3f34
20 changed files with 138 additions and 105 deletions

View file

@ -57,8 +57,8 @@ export async function deleteActivity(activity_id: any) {
return res;
}
export async function getActivityWithAuthHeader(activity_id: any, next: any, access_token: string) {
const result = await fetch(`${getAPIUrl()}activities/activity_${activity_id}`, RequestBodyWithAuthHeader("GET", null, next, access_token));
export async function getActivityWithAuthHeader(activity_uuid: any, next: any, access_token: string) {
const result = await fetch(`${getAPIUrl()}activities/activity_${activity_uuid}`, RequestBodyWithAuthHeader("GET", null, next, access_token));
const res = await result.json();
return res;
}

View file

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