feat: complete Phases 2 to 5 inclusive - Access Core, Web Cockpit, Hardware enqueuing, Optical Scanner and QA (v0.5.0-beta)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
# ==============================================================================
|
||||
# Endpoints de Puestos de Control y Workstations (/api/v1/control-posts)
|
||||
# ==============================================================================
|
||||
from typing import List, Dict, Any
|
||||
from fastapi import APIRouter
|
||||
from app.schemas.workstation_schema import WorkstationStatusResponse
|
||||
from app.services.workstation_service import WorkstationService
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get(
|
||||
"/workstation/{name}/status",
|
||||
response_model=WorkstationStatusResponse,
|
||||
summary="Consultar estado y carriles asignados a una Workstation",
|
||||
)
|
||||
async def get_workstation_status(name: str):
|
||||
"""Verifica si la tablet/estación está autorizada como Puesto de Control y retorna sus carriles."""
|
||||
return WorkstationService.obtener_estado_workstation(name)
|
||||
|
||||
|
||||
@router.get(
|
||||
"/workstations",
|
||||
response_model=List[Dict[str, Any]],
|
||||
summary="Listar todas las Workstations registradas",
|
||||
)
|
||||
async def list_workstations():
|
||||
"""Listado de estaciones para selector de tablets o supervisores."""
|
||||
return WorkstationService.listar_estaciones_disponibles()
|
||||
Reference in New Issue
Block a user