From 8c53f61381eabb22438220bab943f565bb64bcca Mon Sep 17 00:00:00 2001 From: Shobhit Pathak Date: Thu, 28 Sep 2023 13:08:27 +0530 Subject: [PATCH] Fixed adding server --- views/add-server.ejs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/views/add-server.ejs b/views/add-server.ejs index 6ac79ad..48defb1 100644 --- a/views/add-server.ejs +++ b/views/add-server.ejs @@ -132,20 +132,20 @@ e.preventDefault(); // Prevent the default form submission // Get input values - const serverIP = $('#serverIP').val(); - const serverPort = $('#serverPort').val(); - const rconPassword = $('#rconPassword').val(); + const server_ip = $('#serverIP').val(); + const server_port = $('#serverPort').val(); + const rcon_password = $('#rconPassword').val(); - if (!serverIP || !serverPort || !rconPassword) { + if (!server_ip || !server_port || !rcon_password) { alert('All fields are required.'); return; // Do not proceed with the request } // Create server data object const serverData = { - serverIP, - serverPort, - rconPassword, + server_ip, + server_port, + rcon_password, }; // Make an API POST request to add the server