mirror of
https://github.com/bitwarden/server.git
synced 2025-07-04 09:32:48 -05:00
[PM-22190] Remove gathering and reporting of ReferenceEvents (#5897)
* Remove gathering and reporting of ReferenceEvents * Fix test that relied on reference events throwing --------- Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:

committed by
GitHub

parent
d7d90e7f3e
commit
c7b1c7f6d5
@ -6,14 +6,10 @@ using Bit.Api.Utilities;
|
||||
using Bit.Core.Auth.UserFeatures.TwoFactorAuth.Interfaces;
|
||||
using Bit.Core.Billing.Models;
|
||||
using Bit.Core.Billing.Services;
|
||||
using Bit.Core.Context;
|
||||
using Bit.Core.Exceptions;
|
||||
using Bit.Core.Models.Business;
|
||||
using Bit.Core.Services;
|
||||
using Bit.Core.Settings;
|
||||
using Bit.Core.Tools.Enums;
|
||||
using Bit.Core.Tools.Models.Business;
|
||||
using Bit.Core.Tools.Services;
|
||||
using Bit.Core.Utilities;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@ -161,8 +157,6 @@ public class AccountsController(
|
||||
[HttpPost("cancel")]
|
||||
public async Task PostCancelAsync(
|
||||
[FromBody] SubscriptionCancellationRequestModel request,
|
||||
[FromServices] ICurrentContext currentContext,
|
||||
[FromServices] IReferenceEventService referenceEventService,
|
||||
[FromServices] ISubscriberService subscriberService)
|
||||
{
|
||||
var user = await userService.GetUserByPrincipalAsync(User);
|
||||
@ -175,12 +169,6 @@ public class AccountsController(
|
||||
await subscriberService.CancelSubscription(user,
|
||||
new OffboardingSurveyResponse { UserId = user.Id, Reason = request.Reason, Feedback = request.Feedback },
|
||||
user.IsExpired());
|
||||
|
||||
await referenceEventService.RaiseEventAsync(new ReferenceEvent(
|
||||
ReferenceEventType.CancelSubscription,
|
||||
user,
|
||||
currentContext)
|
||||
{ EndOfPeriod = user.IsExpired() });
|
||||
}
|
||||
|
||||
[HttpPost("reinstate-premium")]
|
||||
|
Reference in New Issue
Block a user