adding graphql integration
This commit is contained in:
@@ -10,7 +10,7 @@ router = APIRouter(prefix="/cellsites", tags=["cellsites"])
|
||||
def get_cellsites() -> list[dict[Any, Any]]: # type: ignore
|
||||
conn = db.connect_to_db()
|
||||
try:
|
||||
with db.connect_to_db() as conn:
|
||||
with conn:
|
||||
return db.get_cellsites(conn)
|
||||
except Exception as e:
|
||||
logger.error(f"Error fetching cellsites: {e}", exc_info=True)
|
||||
@@ -23,7 +23,7 @@ def get_cellsites() -> list[dict[Any, Any]]: # type: ignore
|
||||
def get_cellsite(id: int) -> list[dict[str, Any]]: # type: ignore
|
||||
conn = db.connect_to_db()
|
||||
try:
|
||||
with db.connect_to_db() as conn:
|
||||
with conn:
|
||||
return db.get_cellsite(conn, id)
|
||||
except Exception as e:
|
||||
logger.error(f"Error fetching cellsite {id}: {e}", exc_info=True)
|
||||
|
||||
Reference in New Issue
Block a user