Fix ZIP download

This commit is contained in:
Luca Bosin
2023-08-25 21:25:02 +02:00
parent 4fc1595af3
commit af26457dbd

View File

@ -8,7 +8,7 @@ export const GET: RequestHandler = async ({ params, url }) => {
try {
const zipName = getZipName(params);
const album = await getMetadata(zipName);
const allowDownload = album.allowDownload === false ? false : true;
const allowDownload = 'allowDownload' in album && album.allowDownload === false ? false : true;
if (!allowDownload) {
throw error(403, 'Forbidden');
}