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.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user