public async Task CreateRay(string text) { var ray = new Ray() { FrequencyId = selectedFrequency.Value, Text = text, UserId = CurrentUser.Id }; if (CurrentUser.Id == 0) { _navigationManager.NavigateTo("/login"); ray.UserId = CurrentUser.Id; } Rays = await _apiService.AddRay(ray); UpdatedRays?.Invoke(); }
public async Task CreateRay(string text) { var ray = new Ray() { FrequencyId = selectedFrequency.Value, Text = text, UserId = CurrentUser.Id }; if (CurrentUser.Id == 0) { await GetOrCreateUser(); ray.UserId = CurrentUser.Id; } Rays = await _apiService.AddRay(ray); UpdatedRays?.Invoke(); }