feat(scanner): POST /api/scanner/cancel/:jobId (admin)

Cancels a pending or running scan job. Responses: 200 with the job id
and status on acceptance, 404 for unknown jobs, 409 for jobs already
in a terminal state (completed/failed/cancelled).

Additive route in the existing admin scanner group; no contract pins
affected.
This commit is contained in:
John O'Keefe committed 2026-10-18 18:02:25 -04:00
1 parent 30ecdd4bf3
commit 5b81e19f2f
2 files changed
+24

No files matched your search

+1
View File
@@ -17,6 +17,7 @@ func registerScannerRoutes(protected, admin *echo.Group, h *handlers.Handler) {
admin.POST("/scanner/scan", h.ScanLibrary)
admin.POST("/scanner/start", h.StartScanner)
admin.POST("/scanner/stop", h.StopScanner)
admin.POST("/scanner/cancel/:jobId", h.CancelScan)
admin.GET("/scanner/status/:jobId", h.GetScanStatus)
admin.GET("/scanner/active", h.GetActiveScans)