mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: remove star imports
This commit is contained in:
parent
d4497e03fb
commit
9c2332961b
9 changed files with 69 additions and 37 deletions
|
|
@ -9,7 +9,7 @@ from src.services.orgs.schemas.orgs import (
|
|||
)
|
||||
from src.services.users.schemas.users import UserOrganization
|
||||
from src.services.users.users import PublicUser
|
||||
from src.security.security import *
|
||||
from src.security.security import verify_user_rights_with_roles
|
||||
from fastapi import HTTPException, UploadFile, status, Request
|
||||
|
||||
|
||||
|
|
@ -103,7 +103,6 @@ async def update_org(
|
|||
# update org
|
||||
await orgs.update_one({"org_id": org_id}, {"$set": updated_org.dict()})
|
||||
|
||||
|
||||
return updated_org.dict()
|
||||
|
||||
|
||||
|
|
@ -117,17 +116,13 @@ async def update_org_logo(
|
|||
|
||||
org = await orgs.find_one({"org_id": org_id})
|
||||
|
||||
|
||||
name_in_disk = await upload_org_logo(logo_file)
|
||||
|
||||
# update org
|
||||
# update org
|
||||
org = await orgs.update_one({"org_id": org_id}, {"$set": {"logo": name_in_disk}})
|
||||
|
||||
|
||||
return {"detail": "Logo updated"}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
async def delete_org(request: Request, org_id: str, current_user: PublicUser):
|
||||
await verify_org_rights(request, org_id, current_user, "delete")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue