logging
This commit is contained in:
parent
ba120bfa24
commit
88bbbc5e91
@ -8,6 +8,8 @@ namespace BinaryDad.Coding.Hubs
|
|||||||
{
|
{
|
||||||
public Task UpdateCode(string user, int index, string code, bool isTeacher)
|
public Task UpdateCode(string user, int index, string code, bool isTeacher)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine($"Received code from {user} with index {index}");
|
||||||
|
|
||||||
if (index == 0)
|
if (index == 0)
|
||||||
{
|
{
|
||||||
if (Users.Sessions.TryGetValue(Context.ConnectionId, out User value))
|
if (Users.Sessions.TryGetValue(Context.ConnectionId, out User value))
|
||||||
@ -26,9 +28,13 @@ namespace BinaryDad.Coding.Hubs
|
|||||||
// only send to all if it's a teacher
|
// only send to all if it's a teacher
|
||||||
if (isTeacher)
|
if (isTeacher)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine($"Sending code from {user}");
|
||||||
|
|
||||||
return Clients.All.SendAsync("ReceiveCode", user, index, code);
|
return Clients.All.SendAsync("ReceiveCode", user, index, code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user