Finalize v0.4.0
This commit is contained in:
27
pkg/qbit/server/ui_routes.go
Normal file
27
pkg/qbit/server/ui_routes.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"github.com/go-chi/chi/v5"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func (u *uiHandler) Routes(r chi.Router) http.Handler {
|
||||
r.Group(func(r chi.Router) {
|
||||
r.Get("/", u.IndexHandler)
|
||||
r.Get("/download", u.DownloadHandler)
|
||||
r.Get("/repair", u.RepairHandler)
|
||||
r.Get("/config", u.ConfigHandler)
|
||||
r.Route("/internal", func(r chi.Router) {
|
||||
r.Get("/arrs", u.handleGetArrs)
|
||||
r.Post("/add", u.handleAddContent)
|
||||
r.Get("/cached", u.handleCheckCached)
|
||||
r.Post("/repair", u.handleRepairMedia)
|
||||
r.Get("/torrents", u.handleGetTorrents)
|
||||
r.Delete("/torrents/{hash}", u.handleDeleteTorrent)
|
||||
r.Get("/config", u.handleGetConfig)
|
||||
r.Get("/version", u.handleGetVersion)
|
||||
})
|
||||
})
|
||||
|
||||
return r
|
||||
}
|
||||
Reference in New Issue
Block a user