minor: cleanup
Minor tweaks to reduce warnings in IDE e.g. unused imports.
This commit is contained in:
parent
d89c926a38
commit
f54876eac6
7 changed files with 10 additions and 15 deletions
|
|
@ -9,18 +9,13 @@ from typing import Annotated
|
|||
|
||||
from fastapi import APIRouter, HTTPException
|
||||
from fastapi.params import Path
|
||||
from sqlalchemy.sql import exists
|
||||
|
||||
from src.organisation.constants import ContactType
|
||||
from src.organisation.schemas import OrgContactGetResponse
|
||||
from src.organisation.models import Organisation as Org
|
||||
from src.contact.models import Contact
|
||||
from src.user.models import User
|
||||
from src.user.schemas import UserResponse, OIDCUser, OrgResponse
|
||||
|
||||
from src.organisation.models import OrgUsers, Organisation
|
||||
|
||||
from src.auth.service import claims_dependency, org_user_dependency, org_admin_dependency
|
||||
from src.auth.service import claims_dependency, org_or_super_admin_dependency
|
||||
from src.database import db_dependency
|
||||
|
||||
|
||||
|
|
@ -31,7 +26,7 @@ router = APIRouter(
|
|||
|
||||
|
||||
@router.get("/{org_id}/contact/{contact_type}", response_model=OrgContactGetResponse)
|
||||
async def get_contact(db: db_dependency, user: claims_dependency, is_admin: org_user_dependency, contact_type: ContactType, org_id: Annotated[int, Path(gt=0)]):
|
||||
async def get_contact(db: db_dependency, user: claims_dependency, is_admin: org_or_super_admin_dependency, contact_type: ContactType, org_id: Annotated[int, Path(gt=0)]):
|
||||
org_model = db.query(Org).filter(Org.id == org_id).first()
|
||||
if org_model is None:
|
||||
raise HTTPException(status_code=404, detail="Organisation not found")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue