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
@@ -14,11 +14,12 @@ import (
)
type TransactionHandler struct {
svc *service.TransactionService
svc *service.TransactionService
gameSvc *service.GameService
}
func NewTransactionHandler(svc *service.TransactionService) *TransactionHandler {
return &TransactionHandler{svc: svc}
func NewTransactionHandler(svc *service.TransactionService, gameSvc *service.GameService) *TransactionHandler {
return &TransactionHandler{svc: svc, gameSvc: gameSvc}
}
func (h *TransactionHandler) List(w http.ResponseWriter, r *http.Request) {
@@ -42,6 +43,7 @@ func (h *TransactionHandler) Create(w http.ResponseWriter, r *http.Request) {
respondError(w, http.StatusBadRequest, err.Error())
return
}
h.gameSvc.NotifyAction(r.Context(), "transaction_created", map[string]any{"category_id": out.CategoryID})
respondJSON(w, http.StatusCreated, out)
}