added tests for backend, router dom to frontend

This commit is contained in:
QkoSad
2024-12-03 16:09:25 +02:00
parent 8e4317abde
commit cb7b3ad94c
1142 changed files with 3599 additions and 573520 deletions
+33
View File
@@ -0,0 +1,33 @@
using System.Net;
using System.Text;
using MySql.Data.MySqlClient;
namespace Server
{
public class Reset : Route
{
public static void HandleRequest(HttpListenerRequest request, HttpListenerResponse response)
{
try
{
// prepare SQL query
MySqlCommand cmd = new MySqlCommand();
cmd.CommandText = "CALL InitDB";
using (MySqlConnection conn = new MySqlConnection(connectionString))
{
cmd.Connection = conn;
// open connection
conn.Open();
// execute query
cmd.ExecuteNonQuery();
// set up and send response
SendSuccess(response);
}
}
catch (Exception ex)
{
SendError(response, ex);
}
}
}
}