Fix ZIP download
This commit is contained in:
@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user