app/controllers/DestinationsController.java
@Security.Authenticated(SecureSession.class)
    public CompletionStage<Result> updatePhotoPrivacy(Integer id) {
        return supplyAsync(() -> {
            photoRepository.updateVisibility(id);
            return redirect("/destinations/show/false/0").flashing("success", "Visibility updated.");
        });
    }
/**
     * Endpoint method to update the privacy of a photo
     *
     * @param id the photo id
     * @return Redirect to teh destinations page
     */
Endpoint method to update the privacy of a photo
@param id the photo id
@return Redirect to teh destinations page
Endpoint method to update the privacy of a photo @param id the photo id @return Redirect to teh destinations page
@Security.Authenticated(SecureSession.class)
    public CompletionStage<Result> updatePhotoPrivacy(Integer id) {
        return supplyAsync(() -> {
            photoRepository.updateVisibility(id);
            return redirect("/destinations/show/false/0").flashing("success", "Visibility updated.");
        });
    }
@ Security . Authenticated ( SecureSession . class ) public CompletionStage < Result > updatePhotoPrivacy ( Integer id ) { return supplyAsync ( ( ) -> { photoRepository . updateVisibility ( id ) ; return redirect ( "/destinations/show/false/0" ) . flashing ( "success" , "Visibility updated." ) ; } ) ; }
Endpoint method to update the privacy of a photo
 @param id the photo id
 @return Redirect to teh destinations page
Endpoint method to update the privacy of a photo @param id the photo id @return Redirect to teh destinations page