fixed SIGSEGV if no messages are present

This commit is contained in:
2022-01-29 20:21:49 +01:00
parent b0870cd927
commit 2f15560d84
2 changed files with 9 additions and 4 deletions

View File

@@ -1046,6 +1046,9 @@ func main() {
router.HandleFunc(`/match/{id:\d{19}}/rounds`, func(writer http.ResponseWriter, request *http.Request) {}).Methods(http.MethodOptions)
router.HandleFunc(`/match/{id:\d{19}}/rounds`, getMatchRounds).Methods(http.MethodGet)
router.HandleFunc(`/match/{id:\d{19}}/rounds`, func(writer http.ResponseWriter, request *http.Request) {}).Methods(http.MethodOptions)
router.HandleFunc(`/match/{id:\d{19}}/rounds`, getMatchRounds).Methods(http.MethodGet)
router.HandleFunc(`/matches`, func(writer http.ResponseWriter, request *http.Request) {}).Methods(http.MethodOptions)
router.HandleFunc(`/matches`, getMatches).Methods(http.MethodGet)