Moved around more code. Implemented more sqlc. Added support to generate swagger.

Added support for profiling. Removed the pkg module altogether.
Everything except old sync is now using code generated by sqlc.
This commit is contained in:
Sansan committed 2025-01-15 16:04:14 +01:00
1 parent db8214cb02
commit d653463f58
43 files changed
+947 -1133

No files matched your search

+4 -3
View File
@@ -3,9 +3,10 @@ package server
import (
"log"
"music-server/internal/backend"
"music-server/internal/database"
"net/http"
"github.com/labstack/echo"
"github.com/labstack/echo/v4"
)
type SyncHandler struct {
@@ -16,13 +17,13 @@ func NewSyncHandler() *SyncHandler {
}
func (s *SyncHandler) SyncGames(ctx echo.Context) error {
backend.SyncGames()
database.SyncGames()
backend.Reset()
return ctx.JSON(http.StatusOK, "Games are synced")
}
func (s *SyncHandler) SyncGamesQuick(ctx echo.Context) error {
backend.SyncGamesQuick()
database.SyncGamesQuick()
backend.Reset()
return ctx.JSON(http.StatusOK, "Games are synced")
}