This commit is contained in:
+11
-11
@@ -51,7 +51,7 @@ func (s *Server) RegisterRoutes() http.Handler {
|
||||
e.GET("/assets/*", echo.WrapHandler(fileServer))
|
||||
|
||||
e.GET("/search", echo.WrapHandler(templ.Handler(web.HelloForm())))
|
||||
e.POST("/find", echo.WrapHandler(http.HandlerFunc(web.FindGameWebHandler)))
|
||||
e.POST("/find", echo.WrapHandler(http.HandlerFunc(web.FindSoundtrackWebHandler)))
|
||||
|
||||
e.Static("/", "/frontend")
|
||||
|
||||
@@ -136,20 +136,20 @@ func (s *Server) RegisterRoutes() http.Handler {
|
||||
|
||||
// Statistics API endpoints (protected by token auth)
|
||||
statistics := s.statisticsHandler
|
||||
protectedV1.GET("/statistics/games/most-played", func(c *echo.Context) error {
|
||||
return statistics.GetMostPlayedGames(c)
|
||||
protectedV1.GET("/statistics/soundtracks/most-played", func(c *echo.Context) error {
|
||||
return statistics.GetMostPlayedSoundtracks(c)
|
||||
})
|
||||
protectedV1.GET("/statistics/games/least-played", func(c *echo.Context) error {
|
||||
return statistics.GetLeastPlayedGames(c)
|
||||
protectedV1.GET("/statistics/soundtracks/least-played", func(c *echo.Context) error {
|
||||
return statistics.GetLeastPlayedSoundtracks(c)
|
||||
})
|
||||
protectedV1.GET("/statistics/games/never-played", func(c *echo.Context) error {
|
||||
return statistics.GetNeverPlayedGames(c)
|
||||
protectedV1.GET("/statistics/soundtracks/never-played", func(c *echo.Context) error {
|
||||
return statistics.GetNeverPlayedSoundtracks(c)
|
||||
})
|
||||
protectedV1.GET("/statistics/games/last-played", func(c *echo.Context) error {
|
||||
return statistics.GetLastPlayedGames(c)
|
||||
protectedV1.GET("/statistics/soundtracks/last-played", func(c *echo.Context) error {
|
||||
return statistics.GetLastPlayedSoundtracks(c)
|
||||
})
|
||||
protectedV1.GET("/statistics/games/oldest-played", func(c *echo.Context) error {
|
||||
return statistics.GetOldestPlayedGames(c)
|
||||
protectedV1.GET("/statistics/soundtracks/oldest-played", func(c *echo.Context) error {
|
||||
return statistics.GetOldestPlayedSoundtracks(c)
|
||||
})
|
||||
protectedV1.GET("/statistics/songs/most-played", func(c *echo.Context) error {
|
||||
return statistics.GetMostPlayedSongs(c)
|
||||
|
||||
Reference in New Issue
Block a user