Fixed some Server bugs where the Employee is not send as full object

This commit is contained in:
Tim G. | SnapixLP
2025-06-06 00:00:46 +02:00
parent c0462e01b1
commit 830c94d5e4
3 changed files with 64 additions and 44 deletions

View File

@@ -72,9 +72,7 @@ public class CommandLibrary
if (socket.LoggedInClients.TryGetValue(client, out var username))
{
Employee returnEmployee = new Employee(username);
string jsonEmployee = JsonSerializer.Serialize(returnEmployee);
return jsonEmployee;
return GenerateTestEmployee().ToJson();
}
throw new CommandException("User not logged in.");
@@ -89,5 +87,18 @@ public class CommandLibrary
$"not implemented yet, args: {string.Join(", ", args)}";
#endregion
#region DEV-TEST
private static Employee GenerateTestEmployee()
{
return new Employee(
code: "TEST",
surname: "Musermann",
forename: "Max",
email: "max.mustermann@company.de"
);
}
#endregion
}