From a77926838bbb2ad73d6ceffe813f80928b545830 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Wed, 11 Mar 2026 16:42:23 +0100 Subject: [PATCH] refactor(clickTtPlayerRegistrationService): update debug HTML file path generation - Modified the buildDebugHtmlPath function to use path.join for constructing the file path, ensuring compatibility across different operating systems. - This change enhances the maintainability of the code by standardizing file path handling. --- backend/services/clickTtPlayerRegistrationService.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/services/clickTtPlayerRegistrationService.js b/backend/services/clickTtPlayerRegistrationService.js index c0e8e712..5685f7b8 100644 --- a/backend/services/clickTtPlayerRegistrationService.js +++ b/backend/services/clickTtPlayerRegistrationService.js @@ -1,5 +1,6 @@ import { chromium } from 'playwright'; import { writeFile } from 'fs/promises'; +import path from 'path'; import Member from '../models/Member.js'; import Club from '../models/Club.js'; import ClickTtAccount from '../models/ClickTtAccount.js'; @@ -38,7 +39,7 @@ function escapeRegExp(value) { function buildDebugHtmlPath() { const timestamp = new Date().toISOString().replace(/[:.]/g, '-'); - return `/tmp/clicktt-debug-${timestamp}.html`; + return path.join(process.cwd(), 'backend', 'tmp', `clicktt-debug-${timestamp}.html`); } class ClickTtPlayerRegistrationService {