mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-24 16:43:37 +01:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user