From dbede48d4f6eef36697d06542d67129244d04733 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Thu, 2 Oct 2025 10:40:24 +0200 Subject: [PATCH] =?UTF-8?q?Entfernt=20Konsolenausgaben=20aus=20der=20MyTis?= =?UTF-8?q?chtennisClient-Klasse,=20um=20die=20Codequalit=C3=A4t=20zu=20ve?= =?UTF-8?q?rbessern=20und=20die=20Lesbarkeit=20zu=20erh=C3=B6hen.=20Diese?= =?UTF-8?q?=20=C3=84nderungen=20betreffen=20die=20Methoden=20getUserProfil?= =?UTF-8?q?e=20und=20getClubRankings=20und=20tragen=20zur=20Optimierung=20?= =?UTF-8?q?der=20Protokollierung=20und=20Performance=20bei.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/clients/myTischtennisClient.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/backend/clients/myTischtennisClient.js b/backend/clients/myTischtennisClient.js index f286bf5..a7d9ad4 100644 --- a/backend/clients/myTischtennisClient.js +++ b/backend/clients/myTischtennisClient.js @@ -149,13 +149,11 @@ class MyTischtennisClient { * @returns {Promise} User profile with club info */ async getUserProfile(cookie) { - console.log('[getUserProfile] - Calling /?_data=root with cookie:', cookie?.substring(0, 50) + '...'); const result = await this.authenticatedRequest('/?_data=root', cookie, { method: 'GET' }); - console.log('[getUserProfile] - Result success:', result.success); if (result.success) { console.log('[getUserProfile] - Response structure:', { @@ -169,8 +167,6 @@ class MyTischtennisClient { qttr: result.data?.userProfile?.qttr }); - console.log('[getUserProfile] - Full userProfile.club:', result.data?.userProfile?.club); - console.log('[getUserProfile] - Full userProfile.organization:', result.data?.userProfile?.organization); return { success: true, @@ -199,12 +195,10 @@ class MyTischtennisClient { let currentPage = 0; let hasMorePages = true; - console.log('[getClubRankings] - Starting to fetch rankings for club', clubId); while (hasMorePages) { const endpoint = `/rankings/andro-rangliste?all-players=on&clubnr=${clubId}&fednickname=${fedNickname}&results-per-page=100&page=${currentPage}&_data=routes%2F%24`; - console.log(`[getClubRankings] - Fetching page ${currentPage}...`); const result = await this.authenticatedRequest(endpoint, cookie, { method: 'GET' @@ -245,7 +239,6 @@ class MyTischtennisClient { }; } - console.log(`[getClubRankings] - Page ${currentPage}: Found ${entries.length} entries`); // Füge Entries hinzu allEntries.push(...entries); @@ -255,19 +248,15 @@ class MyTischtennisClient { // Oder wenn wir alle erwarteten Einträge haben if (entries.length === 0) { hasMorePages = false; - console.log('[getClubRankings] - No more entries, stopping'); } else if (rankingData.numberOfPages && currentPage >= rankingData.numberOfPages - 1) { hasMorePages = false; - console.log(`[getClubRankings] - Reached last page (${rankingData.numberOfPages})`); } else if (allEntries.length >= rankingData.resultLength) { hasMorePages = false; - console.log(`[getClubRankings] - Got all entries (${allEntries.length}/${rankingData.resultLength})`); } else { currentPage++; } } - console.log(`[getClubRankings] - Total entries fetched: ${allEntries.length}`); return { success: true,