feat(#22): gamificação RPG — XP, quests, conquistas, cosméticos e personagem SVG pixel art

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
2026-05-26 21:46:41 -03:00
co-authored by Claude Sonnet 4.6
parent 9a964423fd
commit c1964ea036
21 changed files with 1346 additions and 10 deletions
+5 -3
View File
@@ -11,11 +11,12 @@ import (
const maxUploadSize = 10 << 20 // 10 MB
type ImportHandler struct {
svc *service.ImportService
svc *service.ImportService
gameSvc *service.GameService
}
func NewImportHandler(svc *service.ImportService) *ImportHandler {
return &ImportHandler{svc: svc}
func NewImportHandler(svc *service.ImportService, gameSvc *service.GameService) *ImportHandler {
return &ImportHandler{svc: svc, gameSvc: gameSvc}
}
// Preview parses the uploaded file and returns rows with duplicate flags.
@@ -78,5 +79,6 @@ func (h *ImportHandler) Confirm(w http.ResponseWriter, r *http.Request) {
respondError(w, http.StatusInternalServerError, "failed to save transactions")
return
}
h.gameSvc.NotifyAction(r.Context(), "import_confirmed", map[string]any{"count": result.Imported})
respondJSON(w, http.StatusOK, result)
}