Skip to content

Commit 5358f9c

Browse files
author
Jayash Satolia
committed
Fix
1 parent 0ce5f8d commit 5358f9c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

code/go/0chain.net/blobbercore/handler/handler_integration_tests.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,13 @@ func SetupHandlers(r *mux.Router) {
2525
setupHandlers(s)
2626

2727
s.HandleFunc("/v1/file/list/{allocation}",
28-
RateLimitByObjectRL(common.ToJSONOrNotResponse(WithReadOnlyConnection(ListHandler)))).
28+
RateLimitByObjectRL(common.ToJSONOrNotResponse(WithConnectionNotRespond(ListHandler)))).
29+
Methods(http.MethodGet, http.MethodOptions)
30+
s.HandleFunc("/v1/file/upload/{allocation}",
31+
RateLimitByFileRL(common.ToJSONOrNotResponse(WithConnectionNotRespond(UploadHandler))))
32+
s.HandleFunc("/v1/file/download/{allocation}",
33+
RateLimitByFileRL(ToByteStreamOrNot(WithConnectionNotRespond(DownloadHandler)))).
2934
Methods(http.MethodGet, http.MethodOptions)
30-
s.HandleFunc("/v1/file/upload/{allocation}", RateLimitByFileRL(common.ToJSONOrNotResponse(WithConnection(UploadHandler))))
31-
s.HandleFunc("/v1/file/download/{allocation}", RateLimitByFileRL(ToByteStreamOrNot(WithConnection(DownloadHandler)))).Methods(http.MethodGet, http.MethodOptions)
3235
}
3336

3437
func WithReadOnlyConnectionNotRespond(handler common.JSONResponderOrNotF) common.JSONResponderOrNotF {

0 commit comments

Comments
 (0)