Update fastapi_endpoint to endpoint

This commit is contained in:
Julian Stirling 2025-12-14 13:09:25 +00:00
parent 5d3aa71b4f
commit c318fddf89

View file

@ -526,7 +526,7 @@ class SmartScanThing(lt.Thing):
overlap=self._scan_data.overlap, overlap=self._scan_data.overlap,
) )
@lt.fastapi_endpoint( @lt.endpoint(
"get", "get",
"scans/stitched_thumbnail.jpg", "scans/stitched_thumbnail.jpg",
responses={ responses={
@ -597,7 +597,7 @@ class SmartScanThing(lt.Thing):
ongoing=None if self._ongoing_scan is None else self._ongoing_scan.name, ongoing=None if self._ongoing_scan is None else self._ongoing_scan.name,
) )
@lt.fastapi_endpoint( @lt.endpoint(
"get", "get",
"get_stitch/{scan_name}", "get_stitch/{scan_name}",
responses={ responses={
@ -621,7 +621,7 @@ class SmartScanThing(lt.Thing):
raise HTTPException(404, "File not found") raise HTTPException(404, "File not found")
return FileResponse(stitch_path) return FileResponse(stitch_path)
@lt.fastapi_endpoint( @lt.endpoint(
"delete", "delete",
"scans/{scan_name}", "scans/{scan_name}",
responses={ responses={
@ -643,7 +643,7 @@ class SmartScanThing(lt.Thing):
if not deleted_scan_success: if not deleted_scan_success:
raise HTTPException(400, "Couldn't delete scan, check log for details") raise HTTPException(400, "Couldn't delete scan, check log for details")
@lt.fastapi_endpoint( @lt.endpoint(
"delete", "delete",
"scans", "scans",
) )
@ -710,7 +710,7 @@ class SmartScanThing(lt.Thing):
return None return None
return os.path.getmtime(self.latest_preview_stitch_path) return os.path.getmtime(self.latest_preview_stitch_path)
@lt.fastapi_endpoint( @lt.endpoint(
"get", "get",
"latest_preview_stitch.jpg", "latest_preview_stitch.jpg",
responses={ responses={