Replace Hard-coded HTTP Verbs with Constants (#27219)

* Replace hard-coded HTTP verbs with constants in `net/http`
Этот коммит содержится в:
enzowritescode
2024-07-15 08:52:03 -06:00
коммит произвёл GitHub
родитель e364c2a265
Коммит d44c3d5d45
72 изменённых файлов: 638 добавлений и 622 удалений

Просмотреть файл

@@ -14,10 +14,10 @@ import (
)
func (api *API) InitExport() {
api.BaseRoutes.Exports.Handle("", api.APISessionRequired(listExports)).Methods("GET")
api.BaseRoutes.Export.Handle("", api.APISessionRequired(deleteExport)).Methods("DELETE")
api.BaseRoutes.Export.Handle("", api.APISessionRequired(downloadExport)).Methods("GET")
api.BaseRoutes.Export.Handle("/presign-url", api.APISessionRequired(generatePresignURLExport)).Methods("POST")
api.BaseRoutes.Exports.Handle("", api.APISessionRequired(listExports)).Methods(http.MethodGet)
api.BaseRoutes.Export.Handle("", api.APISessionRequired(deleteExport)).Methods(http.MethodDelete)
api.BaseRoutes.Export.Handle("", api.APISessionRequired(downloadExport)).Methods(http.MethodGet)
api.BaseRoutes.Export.Handle("/presign-url", api.APISessionRequired(generatePresignURLExport)).Methods(http.MethodPost)
}
func listExports(c *Context, w http.ResponseWriter, r *http.Request) {