Installer: Fix issues with newsletter signup (#20705)
* Add setter to allow handling of requests to subscribe to newsletter on install. * Correct serialization of newsletter subscription request. * Fix serialization and use the Umbraco.EmailMarketing service for newsletter signup. * Remove logging of user when setting telemetry level. * Applied suggestions from code review.
This commit is contained in:
@@ -39,11 +39,10 @@ public class MetricsConsentService : IMetricsConsentService
|
||||
return analyticsLevel;
|
||||
}
|
||||
|
||||
public async Task SetConsentLevelAsync(TelemetryLevel telemetryLevel)
|
||||
public Task SetConsentLevelAsync(TelemetryLevel telemetryLevel)
|
||||
{
|
||||
IUser? currentUser = _backOfficeSecurityAccessor.BackOfficeSecurity?.CurrentUser ?? await _userService.GetAsync(Constants.Security.SuperUserKey);
|
||||
|
||||
_logger.LogInformation("Telemetry level set to {telemetryLevel} by {username}", telemetryLevel, currentUser?.Username);
|
||||
_logger.LogInformation("Telemetry level set to {telemetryLevel}", telemetryLevel);
|
||||
_keyValueService.SetValue(Key, telemetryLevel.ToString());
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user