From a1023f0b114072f0778db474bf2f46e94a3e2117 Mon Sep 17 00:00:00 2001 From: kirrg001 Date: Mon, 25 Feb 2019 13:26:03 +0100 Subject: [PATCH] Renamed theme upload file field name no issue - consistent with /images/upload/ endpoint --- core/server/web/api/v2/admin/routes.js | 2 +- core/test/acceptance/old/admin/themes_spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/server/web/api/v2/admin/routes.js b/core/server/web/api/v2/admin/routes.js index 2ef36aadb4..5536935c94 100644 --- a/core/server/web/api/v2/admin/routes.js +++ b/core/server/web/api/v2/admin/routes.js @@ -129,7 +129,7 @@ module.exports = function apiRoutes() { router.post('/themes/upload', mw.authAdminApi, - upload.single('theme'), + upload.single('file'), shared.middlewares.validation.upload({type: 'themes'}), http(apiv2.themes.upload) ); diff --git a/core/test/acceptance/old/admin/themes_spec.js b/core/test/acceptance/old/admin/themes_spec.js index a7fea958e8..38e25ce7c1 100644 --- a/core/test/acceptance/old/admin/themes_spec.js +++ b/core/test/acceptance/old/admin/themes_spec.js @@ -14,7 +14,7 @@ describe('Themes API', function () { const uploadTheme = (options) => { const themePath = options.themePath; - const fieldName = options.fieldName || 'theme'; + const fieldName = 'file'; const request = options.request || ownerRequest; return request