functional

This commit is contained in:
QkoSad
2024-11-29 19:35:10 +02:00
parent fd82786671
commit 8e4317abde
34 changed files with 714 additions and 25 deletions
+7 -4
View File
@@ -6,7 +6,7 @@ using Newtonsoft.Json;
namespace Server
{
// there should be a better way to deal with data comming from sql
public class All
public class Log
{
public object? f_name { get; set; }
public object? l_name { get; set; }
@@ -62,10 +62,10 @@ namespace Server
// execute query and read results
MySqlDataReader reader = cmd.ExecuteReader();
List<All> entries = new List<All>();
List<Log> entries = new List<Log>();
while (reader.Read())
{
entries.Add(new All
entries.Add(new Log
{
f_name = reader["f_name"],
l_name = reader["l_name"],
@@ -93,7 +93,10 @@ namespace Server
response.ContentLength64 = buffer.Length;
response.OutputStream.Write(buffer, 0, buffer.Length);
}
conn.Close();
finally
{
conn.Close();
}
}
}
}