From 95635458912906da6bc7d2dbb94190b125062eca Mon Sep 17 00:00:00 2001 From: elahe Date: Sat, 6 Feb 2021 16:52:32 +0330 Subject: [PATCH 1/2] fixed register by removing extra _ --- src/com/Resources/JSONs/IDGenerator.json | 1 - src/com/plato/Controller/Menus/RegisterFormController.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/com/Resources/JSONs/IDGenerator.json b/src/com/Resources/JSONs/IDGenerator.json index efcf8f2..e69de29 100644 --- a/src/com/Resources/JSONs/IDGenerator.json +++ b/src/com/Resources/JSONs/IDGenerator.json @@ -1 +0,0 @@ -["944106","565519"] \ No newline at end of file diff --git a/src/com/plato/Controller/Menus/RegisterFormController.java b/src/com/plato/Controller/Menus/RegisterFormController.java index efccfb8..3b7ea58 100644 --- a/src/com/plato/Controller/Menus/RegisterFormController.java +++ b/src/com/plato/Controller/Menus/RegisterFormController.java @@ -118,7 +118,7 @@ public void signUp (ActionEvent actionEvent) { // (Class accType, String pfp, String firstName, String lastName, String username, String password, String email, String phoneNum, double money) try { dataOutputStream.writeUTF( - "register_" + (Admin.adminHasBeenCreated() ? Gamer.class : Admin.class).getSimpleName() + "_" + + "register" + (Admin.adminHasBeenCreated() ? Gamer.class : Admin.class).getSimpleName() + "_" + pfp.getImage().getUrl() + "_" + firstName.getText() + "_" + lastName.getText() + "_" + From 0d5923345eb965e9dc0fb4d649231abadc595a02 Mon Sep 17 00:00:00 2001 From: elahe Date: Sat, 6 Feb 2021 17:21:30 +0330 Subject: [PATCH 2/2] tried fixing register --- src/com/Resources/JSONs/AccountRelated/Admin.json | 1 + src/com/plato/Controller/Server.java | 1 + 2 files changed, 2 insertions(+) diff --git a/src/com/Resources/JSONs/AccountRelated/Admin.json b/src/com/Resources/JSONs/AccountRelated/Admin.json index e69de29..4714b6d 100644 --- a/src/com/Resources/JSONs/AccountRelated/Admin.json +++ b/src/com/Resources/JSONs/AccountRelated/Admin.json @@ -0,0 +1 @@ +{"firstName":"ed","lastName":"ed","username":"ed","password":"ed","userID":"464565","email":"ed@email.com","phoneNum":"0912334457","pfpUrl":"https://i.imgur.com/IIyNCG4.png"} \ No newline at end of file diff --git a/src/com/plato/Controller/Server.java b/src/com/plato/Controller/Server.java index 447bc96..ce8c06c 100644 --- a/src/com/plato/Controller/Server.java +++ b/src/com/plato/Controller/Server.java @@ -114,6 +114,7 @@ public void run () { String[] receivedInfo = received.split("_"); System.out.println("receivedInfo = " + Arrays.toString(receivedInfo)); //System.out.println(token); + System.out.println(receivedInfo); switch (receivedInfo[0]) { case "getAllAccounts": dataOutputStream.writeUTF(MainController.getInstance().getGson().toJson(Account.getAccounts()));