示例#1
0
        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)));
        }
示例#2
0
 public async Task <IEnumerable <Workout> > GetAll()
 {
     return(await _workoutRepository.GetAll());
 }