feat: init org thumbnails creation & edition & redesign dash org config page

This commit is contained in:
swve 2024-09-27 11:03:33 +02:00
parent 41a11c5f83
commit aecf03404f
17 changed files with 661 additions and 99 deletions

View file

@ -38,3 +38,19 @@ export async function uploadOrganizationLogo(
const res = await errorHandling(result)
return res
}
export async function uploadOrganizationThumbnail(
org_id: string,
thumbnail_file: any,
access_token: string
) {
// Send file thumbnail as form data
const formData = new FormData()
formData.append('thumbnail_file', thumbnail_file)
const result: any = await fetch(
`${getAPIUrl()}orgs/` + org_id + '/thumbnail',
RequestBodyFormWithAuthHeader('PUT', formData, null, access_token)
)
const res = await errorHandling(result)
return res
}