Browse Source

Added condition to prevent denied requests from notifying the client

SG-701
gbubemismith 3 years ago
parent
commit
e0ad0de035
No known key found for this signature in database
  1. 6
      src/Api/Controllers/AuthRequestsController.cs

6
src/Api/Controllers/AuthRequestsController.cs

@ -142,8 +142,12 @@ public class AuthRequestsController : Controller @@ -142,8 +142,12 @@ public class AuthRequestsController : Controller
authRequest.ResponseDate = DateTime.UtcNow;
authRequest.Approved = model.RequestApproved;
await _authRequestRepository.ReplaceAsync(authRequest);
await _pushNotificationService.PushAuthRequestResponseAsync(authRequest);
if (model.RequestApproved)
{
await _pushNotificationService.PushAuthRequestResponseAsync(authRequest);
}
return new AuthRequestResponseModel(authRequest, _globalSettings.BaseServiceUri.Vault);
}
}

Loading…
Cancel
Save