From 3b32b2081c56f6f5ac819e583f78ba3fdfe91ac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Zbytovsk=C3=BD?= Date: Sun, 5 Jan 2025 14:53:15 +0100 Subject: [PATCH] ENABLE_UPLOAD --- .env | 3 ++- src/components/FeaturePanel/FeaturePanel.tsx | 2 +- src/server/upload/uploadToWikimediaCommons.ts | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env b/.env index 4d1319ba5..18ab1c395 100644 --- a/.env +++ b/.env @@ -20,5 +20,6 @@ NEXT_PUBLIC_API_KEY_GRAPHHOPPER=f189b841-6529-46c6-8a91-51f17477dcda # optional, fill blank to disable UMAMI_WEBSITE_ID=5e4d4917-9031-42f1-a26a-e71d7ab8e3fe -# Password for Wikimedia Commons upload bot, experimental. Please leave blank. +# Wikimedia Commons upload bot, experimental. Please leave blank. +NEXT_PUBLIC_ENABLE_UPLOAD= OSMAPPBOT_PASSWORD= diff --git a/src/components/FeaturePanel/FeaturePanel.tsx b/src/components/FeaturePanel/FeaturePanel.tsx index ec0559744..98039d02b 100644 --- a/src/components/FeaturePanel/FeaturePanel.tsx +++ b/src/components/FeaturePanel/FeaturePanel.tsx @@ -81,7 +81,7 @@ export const FeaturePanel = ({ headingRef }: FeaturePanelProps) => { - {advanced && ( + {process.env.NEXT_PUBLIC_ENABLE_UPLOAD && ( diff --git a/src/server/upload/uploadToWikimediaCommons.ts b/src/server/upload/uploadToWikimediaCommons.ts index 3aa3766a1..d8ff1978b 100644 --- a/src/server/upload/uploadToWikimediaCommons.ts +++ b/src/server/upload/uploadToWikimediaCommons.ts @@ -42,7 +42,6 @@ export const uploadToWikimediaCommons = async ( ); } - console.log('pageId', pageId); // eslint-disable-line no-console const claims = [ claimsHelpers.createCopyrightLicense(), claimsHelpers.createCopyrightStatus(),