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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user