mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: implement image uploading to landing page
This commit is contained in:
parent
d7b6e8282b
commit
3ce7dfdcd2
7 changed files with 244 additions and 37 deletions
|
|
@ -41,6 +41,7 @@ from src.services.orgs.orgs import (
|
|||
update_org_signup_mechanism,
|
||||
update_org_thumbnail,
|
||||
update_org_landing,
|
||||
upload_org_landing_content_service,
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -428,3 +429,23 @@ async def api_update_org_landing(
|
|||
Update organization landing object
|
||||
"""
|
||||
return await update_org_landing(request, landing_object, org_id, current_user, db_session)
|
||||
|
||||
|
||||
@router.post("/{org_id}/landing/content")
|
||||
async def api_upload_org_landing_content(
|
||||
request: Request,
|
||||
org_id: int,
|
||||
content_file: UploadFile,
|
||||
current_user: PublicUser = Depends(get_current_user),
|
||||
db_session: Session = Depends(get_db_session),
|
||||
):
|
||||
"""
|
||||
Upload content for organization landing page
|
||||
"""
|
||||
return await upload_org_landing_content_service(
|
||||
request=request,
|
||||
content_file=content_file,
|
||||
org_id=org_id,
|
||||
current_user=current_user,
|
||||
db_session=db_session,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue