aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/download.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/download.ts')
-rw-r--r--server/controllers/download.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/controllers/download.ts b/server/controllers/download.ts
index fd44f10e9..9a8194c5c 100644
--- a/server/controllers/download.ts
+++ b/server/controllers/download.ts
@@ -132,7 +132,7 @@ function checkAllowResult (res: express.Response, allowParameters: any, result?:
132 if (!result || result.allowed !== true) { 132 if (!result || result.allowed !== true) {
133 logger.info('Download is not allowed.', { result, allowParameters }) 133 logger.info('Download is not allowed.', { result, allowParameters })
134 res.status(HttpStatusCode.FORBIDDEN_403) 134 res.status(HttpStatusCode.FORBIDDEN_403)
135 .json({ error: result.errorMessage || 'Refused download' }) 135 .json({ error: result?.errorMessage || 'Refused download' })
136 136
137 return false 137 return false
138 } 138 }