Add a json handler for home

This commit is contained in:
Ben Adrian Sarmiento
2024-06-24 18:41:27 +02:00
parent 08867d8fea
commit ec25c1ef17
2 changed files with 297 additions and 249 deletions

View File

@@ -52,6 +52,7 @@ func AttachHandlers(router *chi.Mux, downloader *universal.Downloader, torMgr *t
router.Use(hs.options)
router.Get("/", hs.handleHome)
router.Get("/stats", hs.handleHomeJson)
// debug
router.Post("/reboot-worker", hs.handleRebootWorkerPool)
router.Post("/reboot-refresh", hs.handleRebootRefreshWorker)