Firebase_Implementation #135
@ -983,16 +983,6 @@ namespace MarcoBMS.Services.Controllers
|
||||
_logger.LogError(ex, "Exception occured while saving FCM Token for employee {EmployeeId}", loggedInEmployee.Id);
|
||||
return StatusCode(500, ApiResponse<object>.ErrorResponse("Internal Error", ex.Message, 500));
|
||||
}
|
||||
|
||||
_ = Task.Run(async () =>
|
||||
{
|
||||
// --- Push Notification Section ---
|
||||
// This section attempts to send a test push notification to the user's device.
|
||||
// It's designed to fail gracefully and handle invalid Firebase Cloud Messaging (FCM) tokens.
|
||||
await _firebase.SendLoginOnAnotherDeviceMessageAsync(loggedInEmployee.Id, model.FcmToken, tenantId);
|
||||
|
||||
});
|
||||
|
||||
return Ok(ApiResponse<object>.SuccessResponse(new { }, "FCM Token registered Successfuly", 200));
|
||||
}
|
||||
private static string ComputeSha256Hash(string rawData)
|
||||
|
Loading…
x
Reference in New Issue
Block a user