refactor(festa): extract festa logic into FestaService

The festa handler contained event lifecycle management (cleanup expired
events, create new ones) and the repo enforced a business rule (skip
zero-value soul submissions). Move these into a new FestaService to
keep repos as pure data access and consolidate business logic.
This commit is contained in:
Houmgaor
2026-02-24 16:12:40 +01:00
parent 7a56810e78
commit 4d3ec8164c
7 changed files with 231 additions and 20 deletions

View File

@@ -83,6 +83,11 @@ func ensureTowerService(s *Server) {
s.towerService = NewTowerService(s.towerRepo, s.logger)
}
// ensureFestaService wires the FestaService from the server's current repos.
func ensureFestaService(s *Server) {
s.festaService = NewFestaService(s.festaRepo, s.logger)
}
// createMockSession creates a minimal Session for testing.
// Imported from v9.2.x-stable and adapted for main.
func createMockSession(charID uint32, server *Server) *Session {