예제 #1
0
        public async Task <NotificationActionResult <PhotoViewDTO> > Update(UpdatePhotoDTO updatePhotoDTO)
        {
            await _photoService.UpdatePhotoAsync(updatePhotoDTO);

            PhotoViewDTO updatedPhoto = await _photoService.GetPhotoOrDefaultAsync(updatePhotoDTO.Id);

            return(this.Notify(updatedPhoto).As(NotificationType.Success).WithMessage("Updated successfully"));
        }
예제 #2
0
        public async Task <ActionResult <PhotoViewDTO> > GetCurrentUserPhoto(Guid photoId)
        {
            PhotoViewDTO photo = await _photoService.GetPhotoOrDefaultAsync(photoId);

            if (photo == null)
            {
                return(NotFound());
            }
            return(photo);
        }