mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: init org thumbnails creation & edition & redesign dash org config page
This commit is contained in:
parent
41a11c5f83
commit
aecf03404f
17 changed files with 661 additions and 99 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue