public async Task <IActionResult> RegisterForPushNotifications(string id, [FromBody] DeviceRegistration deviceUpdate) { HubResponse registrationResult = await _notificationHubProxy.RegisterForPushNotifications(id, deviceUpdate); if (registrationResult.CompletedWithSuccess) { return(Ok()); } return(BadRequest("An error occurred while sending push notification: " + registrationResult.FormattedErrorMessages)); }
public async Task <IActionResult> RegisterForPushNotifications(DeviceRegistration deviceUpdate) { HubResponse registrationResult = await _notificationHubProxy.RegisterForPushNotifications(deviceUpdate); if (registrationResult.CompletedWithSuccess) { return(Ok()); } return(StatusCode((int)HttpStatusCode.ExpectationFailed)); }