Compare commits
No commits in common. "62a2f9bae44f5738bd9de7721a03eee3e0e423eb" and "3c1722293c1dd216353700932c9daf6faf947886" have entirely different histories.
62a2f9bae4
...
3c1722293c
@ -6,7 +6,7 @@ from src.core.errors import AccessDeniedException
|
||||
from src.api.v1.deps import get_current_active_user, require_admin
|
||||
from src.db.models.app_user import AppUser
|
||||
from src.db.session import get_db
|
||||
from src.domain.schemas import BaseListResponse, BaseSingleResponse, OrgUnitCreateSchema, OrgUnitListSchema, OrgUnitSchema, OrgUnitUpdateSchema, ResponseBase
|
||||
from src.domain.schemas import BaseListResponse, BaseSingleResponse, OrgUnitBaseSchema, OrgUnitListSchema, OrgUnitSchema, OrgUnitUpdateSchema, ResponseBase
|
||||
from src.services.org_unit_service import OrgUnitService
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ async def org_unit_id(
|
||||
|
||||
@router.post("/")
|
||||
async def create_ssp(
|
||||
org_data: OrgUnitCreateSchema,
|
||||
org_data: OrgUnitBaseSchema,
|
||||
db: AsyncSession = Depends(get_db),
|
||||
current_user: AppUser = Depends(require_admin),
|
||||
) -> BaseSingleResponse[OrgUnitSchema]:
|
||||
|
||||
@ -233,10 +233,6 @@ class OrgUnitBaseSchema(BaseModel):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
|
||||
class OrgUnitCreateSchema(OrgUnitBaseSchema):
|
||||
title: str = Field(..., min_length=1)
|
||||
|
||||
|
||||
class OrgUnitUpdateSchema(OrgUnitBaseSchema):
|
||||
title: Optional[str] = None
|
||||
is_ssp: Optional[bool] = None
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user