Fix legacy unit schema migration

Signed-off-by: Sean Du <do4suki@gmail.com>
This commit is contained in:
2026-06-28 01:20:05 +08:00
parent b276fada4b
commit 1bb8f20c88
5 changed files with 29 additions and 1 deletions
+3
View File
@@ -49,6 +49,9 @@ func BuildRewardResp(ss *session.Session, playRewardReq liveschema.RewardReq, is
return liveschema.RewardResp{}, errors.New("live progress not found")
}
_, deckInfo := ss.GetDeckInfo(progress.DeckID)
if deckInfo == nil {
return liveschema.RewardResp{}, errors.New("deck info not found")
}
deckInfo.LiveDifficultyID = difficultyID
unitsList := []liveschema.PlayRewardUnitList{}