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")); }
public async Task <ActionResult <PhotoViewDTO> > GetCurrentUserPhoto(Guid photoId) { PhotoViewDTO photo = await _photoService.GetPhotoOrDefaultAsync(photoId); if (photo == null) { return(NotFound()); } return(photo); }