diff --git a/src/main/java/com/uniovi/services/impl/MultiplayerSessionImpl.java b/src/main/java/com/uniovi/services/impl/MultiplayerSessionImpl.java index a690d37d..0c10044e 100644 --- a/src/main/java/com/uniovi/services/impl/MultiplayerSessionImpl.java +++ b/src/main/java/com/uniovi/services/impl/MultiplayerSessionImpl.java @@ -25,7 +25,7 @@ public MultiplayerSessionImpl(PlayerRepository playerRepository, MultiplayerSess } @Override - //@Transactional + @Transactional public Map getPlayersWithScores(int multiplayerCode) { MultiplayerSession session = multiplayerSessionRepository.findByMultiplayerCode(String.valueOf(multiplayerCode)); Map playerScores = session.getPlayerScores(); @@ -50,7 +50,7 @@ public void multiCreate(String code, Long id) { } @Override - //@Transactional + @Transactional public void addToLobby(String code, Long id) { Player p = playerRepository.findById(id).get(); MultiplayerSession ms=multiplayerSessionRepository.findByMultiplayerCode(code); @@ -59,7 +59,7 @@ public void addToLobby(String code, Long id) { } @Override - //@Transactional + @Transactional public void changeScore(String code, Long id, int score) { Player p = playerRepository.findById(id).get(); MultiplayerSession ms=multiplayerSessionRepository.findByMultiplayerCode(code);