fixed rounds endpoint

This commit is contained in:
2021-10-23 22:44:54 +02:00
parent b06da1647b
commit c5777bcfad

View File

@@ -858,8 +858,8 @@ func main() {
router.HandleFunc(`/match/{id:\d{19}}/weapons`, func(writer http.ResponseWriter, request *http.Request) {}).Methods(http.MethodOptions) router.HandleFunc(`/match/{id:\d{19}}/weapons`, func(writer http.ResponseWriter, request *http.Request) {}).Methods(http.MethodOptions)
router.HandleFunc(`/match/{id:\d{19}}/weapons`, getMatchWeapons).Methods(http.MethodGet) router.HandleFunc(`/match/{id:\d{19}}/weapons`, getMatchWeapons).Methods(http.MethodGet)
router.HandleFunc(`/match/{id:\d{19}}/weapons`, func(writer http.ResponseWriter, request *http.Request) {}).Methods(http.MethodOptions) router.HandleFunc(`/match/{id:\d{19}}/rounds`, func(writer http.ResponseWriter, request *http.Request) {}).Methods(http.MethodOptions)
router.HandleFunc(`/match/{id:\d{19}}/weapons`, getMatchRounds).Methods(http.MethodGet) router.HandleFunc(`/match/{id:\d{19}}/rounds`, getMatchRounds).Methods(http.MethodGet)
router.Use(mux.CORSMethodMiddleware(router)) router.Use(mux.CORSMethodMiddleware(router))
loggedRouter := handlers.LoggingHandler(os.Stdout, router) loggedRouter := handlers.LoggingHandler(os.Stdout, router)
proxyRouter := handlers.ProxyHeaders(loggedRouter) proxyRouter := handlers.ProxyHeaders(loggedRouter)