feat: format with prettier

This commit is contained in:
swve 2024-02-09 21:22:15 +01:00
parent 03fb09c3d6
commit a147ad6610
164 changed files with 11257 additions and 8154 deletions

View file

@ -1,5 +1,9 @@
import { getAPIUrl } from "@services/config/config";
import { RequestBody, errorHandling, RequestBodyForm } from "@services/utils/ts/requests";
import { getAPIUrl } from '@services/config/config'
import {
RequestBody,
errorHandling,
RequestBodyForm,
} from '@services/utils/ts/requests'
/*
This file includes only POST, PUT, DELETE requests
@ -7,16 +11,22 @@ import { RequestBody, errorHandling, RequestBodyForm } from "@services/utils/ts/
*/
export async function updateOrganization(org_id: string, data: any) {
const result: any = await fetch(`${getAPIUrl()}orgs/` + org_id, RequestBody("PUT", data, null));
const res = await errorHandling(result);
return res;
const result: any = await fetch(
`${getAPIUrl()}orgs/` + org_id,
RequestBody('PUT', data, null)
)
const res = await errorHandling(result)
return res
}
export async function uploadOrganizationLogo(org_id: string, logo_file: any) {
// Send file thumbnail as form data
const formData = new FormData();
formData.append("logo_file", logo_file);
const result: any = await fetch(`${getAPIUrl()}orgs/` + org_id + "/logo", RequestBodyForm("PUT", formData, null));
const res = await errorHandling(result);
return res;
}
const formData = new FormData()
formData.append('logo_file', logo_file)
const result: any = await fetch(
`${getAPIUrl()}orgs/` + org_id + '/logo',
RequestBodyForm('PUT', formData, null)
)
const res = await errorHandling(result)
return res
}