mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 23:52:50 -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:
@ -23,8 +23,8 @@ public class AccessTokenCreationResponseModel : ResponseModel
|
||||
}
|
||||
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string ClientSecret { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public string? ClientSecret { get; set; }
|
||||
public DateTime? ExpireAt { get; set; }
|
||||
public DateTime CreationDate { get; set; }
|
||||
public DateTime RevisionDate { get; set; }
|
||||
|
@ -71,5 +71,5 @@ public class PotentialGranteeResponseModel : ResponseModel
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Type { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string Email { get; set; }
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -69,5 +69,5 @@ public class ReferenceEvent
|
||||
public bool? SalesAssistedTrialStarted { get; set; }
|
||||
|
||||
public string ClientId { get; set; }
|
||||
public Version? ClientVersion { get; set; }
|
||||
public Version ClientVersion { get; set; }
|
||||
}
|
||||
|
@ -111,11 +111,11 @@ public class OrganizationDomainRepository : Repository<Core.Entities.Organizatio
|
||||
var dbContext = GetDatabaseContext(scope);
|
||||
|
||||
//Get domains that have not been verified after 72 hours
|
||||
var domains = dbContext.OrganizationDomains
|
||||
.AsEnumerable()
|
||||
var domains = await dbContext.OrganizationDomains
|
||||
.Where(x => (DateTime.UtcNow - x.CreationDate).Days == 4
|
||||
&& x.VerifiedDate == null)
|
||||
.ToList();
|
||||
.AsNoTracking()
|
||||
.ToListAsync();
|
||||
|
||||
return Mapper.Map<List<Core.Entities.OrganizationDomain>>(domains);
|
||||
}
|
||||
|
Reference in New Issue
Block a user