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,6 +38,7 @@ from src.services.orgs.orgs import (
update_org,
update_org_logo,
update_org_signup_mechanism,
update_org_thumbnail,
)
@ -303,7 +304,7 @@ async def api_update_org_logo(
db_session: Session = Depends(get_db_session),
):
"""
Get single Org by Slug
Update org logo
"""
return await update_org_logo(
request=request,
@ -314,6 +315,26 @@ async def api_update_org_logo(
)
@router.put("/{org_id}/thumbnail")
async def api_update_org_thumbnail(
request: Request,
org_id: str,
thumbnail_file: UploadFile,
current_user: PublicUser = Depends(get_current_user),
db_session: Session = Depends(get_db_session),
):
"""
Update org thumbnail
"""
return await update_org_thumbnail(
request=request,
thumbnail_file=thumbnail_file,
org_id=org_id,
current_user=current_user,
db_session=db_session,
)
@router.get("/user/page/{page}/limit/{limit}")
async def api_user_orgs(
request: Request,