Storage: use `FlagStorageLocalUpload` for HTTP API

pull/47497/head
Artur Wierzbicki 3 years ago committed by GitHub
parent af8fbc16d6
commit 484bd0b557
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      pkg/api/api.go

@ -217,8 +217,10 @@ func (hs *HTTPServer) registerRoutes() {
orgRoute.Get("/list/*", routing.Wrap(hs.StorageService.List))
orgRoute.Get("/read/*", routing.Wrap(hs.StorageService.Read))
orgRoute.Delete("/delete/*", reqSignedIn, routing.Wrap(hs.StorageService.Delete))
orgRoute.Post("/upload", reqSignedIn, routing.Wrap(hs.StorageService.Upload))
if hs.Features.IsEnabled(featuremgmt.FlagStorageLocalUpload) {
orgRoute.Delete("/delete/*", reqSignedIn, routing.Wrap(hs.StorageService.Delete))
orgRoute.Post("/upload", reqSignedIn, routing.Wrap(hs.StorageService.Upload))
}
})
}

Loading…
Cancel
Save