public async Task <ActionResult <IEnumerable <WorkoutDto> > > GetAll() { if (string.IsNullOrEmpty(CurrentUserId)) { return(Unauthorized(new { message = "Unable to fetch workouts, no user is currently logged in." })); } return(Ok(await _workoutRepository.GetAll(CurrentUserId))); }
public async Task <IEnumerable <Workout> > GetAll() { return(await _workoutRepository.GetAll()); }