Skip to content

Commit

Permalink
Fix up separated routes (2)
Browse files Browse the repository at this point in the history
Co-authored-by: Padraic Shafer <[email protected]>
  • Loading branch information
danielballan and padraic-shafer authored Nov 29, 2023
1 parent b908608 commit 73902c2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tiled/server/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ async def table_partition(
@router.get(
"/table/full/{path:path}",
response_model=schemas.Response,
name="full 'container' or 'table'",
name="full 'table' data",
)
async def table_full(
request: Request,
Expand All @@ -556,8 +556,13 @@ async def table_full(
settings: BaseSettings = Depends(get_settings),
):
"""
Fetch the data below the given node.
Fetch the data for the given table.
"""
if entry.structure_family != StructureFamily.table:
raise HTTPException(
status_code=404,
detail=f"Cannot read {entry.structure_family} structure with /table/full route.",
)
try:
with record_timing(request.state.metrics, "read"):
data = await ensure_awaitable(entry.read, column)
Expand Down

0 comments on commit 73902c2

Please sign in to comment.