1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 09:32:48 -05:00

[PM-2633] Warnings cleanup (#3010)

* Warnings cleanup

* One-line response with null

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Remove condition

* Fix lint from suggestion

---------

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
This commit is contained in:
Matt Bishop
2023-06-16 10:02:05 -04:00
committed by GitHub
parent 5a12db18d1
commit 53327b1993
12 changed files with 41 additions and 49 deletions

View File

@ -131,12 +131,12 @@ public class StripeController : Controller
if (subCanceled || subUnpaid || subIncompleteExpired)
{
// org
if (organizationId != null && organizationId != Guid.Empty)
if (organizationId != Guid.Empty)
{
await _organizationService.DisableAsync(organizationId, subscription.CurrentPeriodEnd);
}
// user
else if (userId != null && userId != Guid.Empty)
else if (userId != Guid.Empty)
{
await _userService.DisablePremiumAsync(userId, subscription.CurrentPeriodEnd);
}
@ -145,11 +145,11 @@ public class StripeController : Controller
if (subActive)
{
if (organizationId != null && organizationId != Guid.Empty)
if (organizationId != Guid.Empty)
{
await _organizationService.EnableAsync(organizationId);
}
else if (userId != null && userId != Guid.Empty)
else if (userId != Guid.Empty)
{
await _userService.EnablePremiumAsync(userId,
subscription.CurrentPeriodEnd);
@ -159,7 +159,7 @@ public class StripeController : Controller
if (subUpdated)
{
// org
if (organizationId != null && organizationId != Guid.Empty)
if (organizationId != Guid.Empty)
{
await _organizationService.UpdateExpirationDateAsync(organizationId,
subscription.CurrentPeriodEnd);
@ -169,7 +169,7 @@ public class StripeController : Controller
}
}
// user
else if (userId != null && userId != Guid.Empty)
else if (userId != Guid.Empty)
{
await _userService.UpdatePremiumExpirationAsync(userId,
subscription.CurrentPeriodEnd);