diff --git a/partitioncloud/modules/albums.py b/partitioncloud/modules/albums.py index 654c278..c664ce1 100644 --- a/partitioncloud/modules/albums.py +++ b/partitioncloud/modules/albums.py @@ -92,32 +92,6 @@ def album(uuid): return abort(404) -@bp.route("//") -def partition(album_uuid, partition_uuid): - """ - Returns a partition in a given album - """ - db = get_db() - partition = db.execute( - """ - SELECT * FROM partition - JOIN contient_partition ON partition_uuid = partition.uuid - JOIN album ON album.id = album_id - WHERE album.uuid = ? - AND partition.uuid = ? - """, - (album_uuid, partition_uuid), - ).fetchone() - - if partition is None: - return abort(404) - - return send_file( - os.path.join("partitions", f"{partition_uuid}.pdf"), - download_name = f"{partition['name']}.pdf" - ) - - @bp.route("/create-album", methods=["POST"]) @login_required def create_album(): diff --git a/partitioncloud/modules/partition.py b/partitioncloud/modules/partition.py index 711cfb2..1b76c0b 100644 --- a/partitioncloud/modules/partition.py +++ b/partitioncloud/modules/partition.py @@ -13,7 +13,6 @@ from .utils import get_all_partitions, User, Partition bp = Blueprint("partition", __name__, url_prefix="/partition") @bp.route("/") -@login_required def partition(uuid): db = get_db() partition = db.execute( diff --git a/partitioncloud/templates/albums/album.html b/partitioncloud/templates/albums/album.html index 232c7b5..dd227ef 100644 --- a/partitioncloud/templates/albums/album.html +++ b/partitioncloud/templates/albums/album.html @@ -66,7 +66,7 @@
{% for partition in partitions | reverse %}
- +