Petition db update including table creation.

This commit is contained in:
2023-08-14 13:40:27 -04:00
parent 82ad774093
commit 7aa63a65b6
5 changed files with 89 additions and 45 deletions
@@ -1,6 +1,7 @@
package engine.net.client.handlers;
import engine.exception.MsgSendException;
import engine.gameManager.DbManager;
import engine.net.client.ClientConnection;
import engine.net.client.msg.ClientNetMsg;
import engine.net.client.msg.PetitionReceivedMsg;
@@ -20,13 +21,13 @@ public class PetitionReceivedMsgHandler extends AbstractClientMsgHandler {
if (origin == null)
return false;
Petition report = new Petition(msg, origin);
Petition petition = new Petition(msg, origin);
if (report == null)
if (petition == null)
return false;
try {
report.updateDatabase();
DbManager.PetitionQueries.WRITE_PETITION_TO_TABLE(petition);
} catch (Exception e) {
return false;
}