Remove avconnect_macro_id field from user response schema for /api/gates
This commit is contained in:
@@ -66,6 +66,7 @@ def keypass_to_response(kp: Keypass) -> KeypassResponse:
|
||||
# ── Gates ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
class GateResponse(BaseModel):
|
||||
"""Full gate response — admin use only."""
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
id: int
|
||||
name: str
|
||||
@@ -75,6 +76,15 @@ class GateResponse(BaseModel):
|
||||
group_name: Optional[str] = None
|
||||
|
||||
|
||||
class GatePublicResponse(BaseModel):
|
||||
"""Gate response for keypass users — no internal fields."""
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
id: int
|
||||
name: str
|
||||
gate_type: str
|
||||
group_name: Optional[str] = None
|
||||
|
||||
|
||||
class GateCreate(BaseModel):
|
||||
name: str
|
||||
gate_type: str # 'car' | 'pedestrian'
|
||||
|
||||
Reference in New Issue
Block a user