Fixed adding server

This commit is contained in:
Shobhit Pathak 2023-09-28 13:08:27 +05:30
parent 18de41ceb4
commit 8c53f61381

View File

@ -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