From 4f5e0c1683974bfc871e0a87aa5eda3a78edb63e Mon Sep 17 00:00:00 2001 From: david-vaclavek Date: Thu, 5 Oct 2023 17:37:29 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20undefined=20variable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/controllers/localazy-transfer-controller.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server/controllers/localazy-transfer-controller.js b/server/controllers/localazy-transfer-controller.js index fffe77a..15c13bc 100644 --- a/server/controllers/localazy-transfer-controller.js +++ b/server/controllers/localazy-transfer-controller.js @@ -7,9 +7,8 @@ const { UPLOAD_FINISHED_EVENT, DOWNLOAD_FINISHED_EVENT } = require('../constants module.exports = { async upload(ctx) { + const streamIdentifier = generateRandomId(); try { - const streamIdentifier = generateRandomId(); - const LocalazyTransferUploadService = strapi .plugin("localazy") .service("localazyTransferUploadService"); @@ -36,9 +35,8 @@ module.exports = { }, async download(ctx) { + const streamIdentifier = generateRandomId(); try { - const streamIdentifier = generateRandomId(); - const LocalazyTransferDownloadService = strapi .plugin("localazy") .service("localazyTransferDownloadService");