public async Task HandleAsync(UserUpdateSettingsCommand command) { var settings = await _context.UserSettings.FirstOrDefaultAsync(x => x.UserId == command.UserId); settings.DarkMode = command.DarkMode; settings.Locale = command.Locale; settings.Popups = command.Popups; await _context.SaveChangesAsync(); }
public async Task <IActionResult> UpdateSettings(UserUpdateSettingsCommand command) { await _commandBus.ExecuteAsync(command); return(Ok()); }