mirror of
https://git.battle-of-pip.de/root/vpr-mitarbeiterverwaltung.git
synced 2025-10-14 10:04:52 +02:00
Fixed some Server bugs where the Employee is not send as full object
This commit is contained in:
@@ -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
|
||||
}
|
Reference in New Issue
Block a user