Fix: nil check player
This commit is contained in:
		| @@ -26,6 +26,9 @@ func createRoom(ctx context.Context, req *models.RoomReq) (*models.Room, error) | ||||
|  | ||||
| func saveFullInfo(ctx context.Context, fi *models.FullInfo) error { | ||||
| 	// INFO: no transactions; so case is possible where first object is updated but the second is not | ||||
| 	if fi.State == nil { | ||||
| 		return errors.New("player is nil") | ||||
| 	} | ||||
| 	if err := repo.PlayerUpdate(ctx, fi.State); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder