Skip to content
Snippets Groups Projects

Refactor/pdf creation

Merged Eirik Steira requested to merge refactor/pdf-creation into dev
1 file
+ 9
3
Compare changes
  • Side-by-side
  • Inline
@@ -106,9 +106,15 @@ public class ImageAlbumService {
return createImageAlbum(title, description, user, tags, new ArrayList<>());
}
public ImageAlbumDocument getDocument(Long currentAlbumId) {
ImageAlbum imageAlbum = getImageAlbumById(currentAlbumId)
/**
* Create and return a new document for the image album with the given id.
* The document is saved to the users dowloads folder.
*
* @param albumId the album id to get a document for
* @return the document created
*/
public ImageAlbumDocument getDocument(Long albumId) {
ImageAlbum imageAlbum = getImageAlbumById(albumId)
.orElseThrow(IllegalArgumentException::new);
String destinationFile = String.format("%s/downloads/%s.pdf",
Loading