mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-28 10:32:55 +01:00
refactor(channelserver): extract Goocoo, Diva, Misc, Scenario, and Mercenary repositories
Move remaining raw s.server.db.* queries from handler files into dedicated repository structs, completing the repository extraction effort. Also adds SaveCharacterData and SaveHouseData to CharacterRepository. Fixes guild_hunts query to select both cats_used and start columns to match the existing two-column Scan call. Adds slot index validation in GoocooRepository to prevent SQL injection via fmt.Sprintf.
This commit is contained in:
@@ -22,7 +22,7 @@ func handleMsgMhfInfoScenarioCounter(s *Session, p mhfpacket.MHFPacket) {
|
||||
pkt := p.(*mhfpacket.MsgMhfInfoScenarioCounter)
|
||||
var scenarios []Scenario
|
||||
var scenario Scenario
|
||||
scenarioData, err := s.server.db.Queryx("SELECT scenario_id, category_id FROM scenario_counter")
|
||||
scenarioData, err := s.server.scenarioRepo.GetCounters()
|
||||
if err != nil {
|
||||
_ = scenarioData.Close()
|
||||
s.logger.Error("Failed to get scenario counter info from db", zap.Error(err))
|
||||
|
||||
Reference in New Issue
Block a user