added endpoint with optional limit

This commit is contained in:
2021-10-23 21:55:56 +02:00
parent 9ebebe18af
commit d0c35fe624

View File

@@ -844,6 +844,7 @@ func main() {
router.HandleFunc("/player/{id}", getPlayer).Methods(http.MethodGet, http.MethodOptions)
router.HandleFunc(`/player/{id}/next/{time:\d+}`, getPlayer).Methods(http.MethodGet, http.MethodOptions)
router.HandleFunc(`/player/{id}/meta/{limit:\d*}`, getPlayerMeta).Methods(http.MethodGet, http.MethodOptions)
router.HandleFunc("/player/{id}/meta", getPlayerMeta).Methods(http.MethodGet, http.MethodOptions)
router.HandleFunc("/player/{id}/track", postPlayerTrack).Methods(http.MethodPost, http.MethodOptions)
router.HandleFunc("/player/{id}/track", deletePlayerTrack).Methods(http.MethodOptions, http.MethodDelete)
router.HandleFunc("/match/parse/{sharecode}", getMatchParse).Methods(http.MethodGet, http.MethodOptions)