public async Task <IActionResult> UpdateMarketingPreferences([FromBody] MarketingNotificationPreferences marketingPreferences) { try { var result = await _marketingService.UpdateMarketingPreferences(marketingPreferences, this.UserId().ToString(), this.ClientId().ToString()); return(new OkObjectResult(result)); } catch (Exception) { return(new BadRequestObjectResult("Marketing preferences could not be updated")); } }
public async Task <Customer> UpdateMarketingPreferences(MarketingNotificationPreferences marketingPreferences, string userId, string clientId) { var result = await _customerService.UpdateCustomerData(userId, "MarketingPreferences", marketingPreferences, clientId); return(result); }