Corrected Key for signalR

This commit is contained in:
ashutosh.nehete 2025-07-05 17:24:57 +05:30
parent e4cc6c1578
commit 558fd6bd5b

View File

@ -365,7 +365,7 @@ namespace MarcoBMS.Services.Controllers
var response = comment.ToCommentVMFromTaskComment(); var response = comment.ToCommentVMFromTaskComment();
_logger.LogInfo("Returning response for commentId: {CommentId}", comment.Id); _logger.LogInfo("Returning response for commentId: {CommentId}", comment.Id);
var notification = new { LoggedInUserId = loggedInEmployee.Id, Keyword = "Task_Report", ProjectId = projectId }; var notification = new { LoggedInUserId = loggedInEmployee.Id, Keyword = "Task_Comment", ProjectId = projectId };
await _signalR.Clients.All.SendAsync("NotificationEventHandler", notification); await _signalR.Clients.All.SendAsync("NotificationEventHandler", notification);
return Ok(ApiResponse<object>.SuccessResponse(response, "Comment saved successfully", 200)); return Ok(ApiResponse<object>.SuccessResponse(response, "Comment saved successfully", 200));
@ -801,7 +801,7 @@ namespace MarcoBMS.Services.Controllers
// Commit all changes to the database // Commit all changes to the database
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
var notification = new { LoggedInUserId = loggedInEmployee.Id, Keyword = "Task_Report", ProjectId = projectId }; var notification = new { LoggedInUserId = loggedInEmployee.Id, Keyword = "Task_Comment", ProjectId = projectId };
await _signalR.Clients.All.SendAsync("NotificationEventHandler", notification); await _signalR.Clients.All.SendAsync("NotificationEventHandler", notification);
_logger.LogInfo("Task {TaskId} successfully approved by Employee {EmployeeId}", approveTask.Id, loggedInEmployee.Id); _logger.LogInfo("Task {TaskId} successfully approved by Employee {EmployeeId}", approveTask.Id, loggedInEmployee.Id);