feat(pet): 修改宠物更新逻辑返回值类型 将PetService.UPdate方法的返回值从error改为bool类型, 并在控制器中相应调整错误处理逻辑,统一使用布尔值判断操作结果。 ```
This commit is contained in:
@@ -132,8 +132,8 @@ func (h Controller) TogglePetBagWarehouse(
|
||||
if index < 0 || index >= len(player.Info.PetList) {
|
||||
return result, errorcode.ErrorCodes.ErrPokemonIDMismatch
|
||||
}
|
||||
err := player.Service.Pet.UPdate(*pet)
|
||||
if err != nil {
|
||||
|
||||
if !player.Service.Pet.UPdate(*pet) {
|
||||
return result, errorcode.ErrorCodes.ErrSystemError
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user