public async Task <IActionResult> GetImages() { var ownerId = this.User.Claims.FirstOrDefault(claim => claim.Type == "sub").Value; var imagesFromRepo = await _imagesService.GetImagesAsync(ownerId); var imagesToReturn = _mapper.Map <IEnumerable <ImageModel> >(imagesFromRepo); return(Ok(imagesToReturn)); }