functional
This commit is contained in:
+7
-4
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user