Storage: use FlagStorageLocalUpload for HTTP API

This commit is contained in:
Artur Wierzbicki 2022-04-28 18:33:02 +04:00 committed by GitHub
parent af8fbc16d6
commit 484bd0b557
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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))
}
})
}