Skip to content

Commit a51e645

Browse files
authored
Fix missing album argument on download (#3443)
1 parent 818c319 commit a51e645

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

resources/js/components/modals/DownloadPhoto.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,16 @@
2929
</Dialog>
3030
</template>
3131
<script setup lang="ts">
32+
import { usePhotoRoute } from "@/composables/photo/photoRoute";
3233
import PhotoService from "@/services/photo-service";
3334
import { useLycheeStateStore } from "@/stores/LycheeState";
3435
import { storeToRefs } from "pinia";
3536
import Button from "primevue/button";
3637
import Dialog from "primevue/dialog";
38+
import { useRouter } from "vue-router";
39+
40+
const router = useRouter();
41+
const { getParentId } = usePhotoRoute(router);
3742
3843
const lycheeState = useLycheeStateStore();
3944
const {
@@ -84,6 +89,6 @@ function isDownloadable(sv: number): boolean {
8489
}
8590
8691
function download(sv: number) {
87-
PhotoService.download([props.photo.id], svtoVariant(sv));
92+
PhotoService.download([props.photo.id], getParentId(), svtoVariant(sv));
8893
}
8994
</script>

0 commit comments

Comments
 (0)