mirror of
https://github.com/DullJZ/s3-balance.git
synced 2026-09-07 08:56:38 +08:00
Fix: Remove duplicate /api prefix in admin routes
This commit is contained in:
@@ -71,10 +71,11 @@ type HealthResponse struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// RegisterRoutes 注册管理API路由
|
// RegisterRoutes 注册管理API路由
|
||||||
|
// 注意: router 参数应该是已经带有 /api 前缀的子路由器
|
||||||
func (h *AdminHandler) RegisterRoutes(router *mux.Router) {
|
func (h *AdminHandler) RegisterRoutes(router *mux.Router) {
|
||||||
router.HandleFunc("/api/buckets", h.ListBuckets).Methods(http.MethodGet)
|
router.HandleFunc("/buckets", h.ListBuckets).Methods(http.MethodGet)
|
||||||
router.HandleFunc("/api/buckets/{name}", h.GetBucketDetail).Methods(http.MethodGet)
|
router.HandleFunc("/buckets/{name}", h.GetBucketDetail).Methods(http.MethodGet)
|
||||||
router.HandleFunc("/api/health", h.GetHealth).Methods(http.MethodGet)
|
router.HandleFunc("/health", h.GetHealth).Methods(http.MethodGet)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ListBuckets 获取存储桶列表
|
// ListBuckets 获取存储桶列表
|
||||||
|
|||||||
Reference in New Issue
Block a user