diff --git a/server/auth.ts b/server/auth.ts index 7831cd0..ce61260 100644 --- a/server/auth.ts +++ b/server/auth.ts @@ -6,7 +6,7 @@ import type { Request, Response, NextFunction } from 'express' import { JWT_SECRET } from './secret.js' import { DATA_DIR } from './config.js' -const DATA_PATH = path.join(DATA_DIR, 'config', 'auth.json') +const DATA_PATH = path.join(DATA_DIR, 'auth.json') const SALT_ROUNDS = 10 interface AuthData { diff --git a/server/index.ts b/server/index.ts index 0a532a5..96b7700 100644 --- a/server/index.ts +++ b/server/index.ts @@ -403,7 +403,7 @@ app.get('/api/downloads', requireAuth, async (_req, res) => { let torrentFinal: any[] = [] try { - const tfPath = path.join(DATA_DIR, 'config', 'torrent_final.json') + const tfPath = path.join(DATA_DIR, 'torrent_final.json') if (fs.existsSync(tfPath)) torrentFinal = JSON.parse(fs.readFileSync(tfPath, 'utf-8')) } catch {} diff --git a/server/logger.ts b/server/logger.ts index b5bf2db..00f90cc 100644 --- a/server/logger.ts +++ b/server/logger.ts @@ -20,7 +20,7 @@ export interface LogEntry { meta? : Record } -const LOGS_PATH = path.join(DATA_DIR, 'config', 'logs.jsonl') +const LOGS_PATH = path.join(DATA_DIR, 'logs.jsonl') const MAX_LINES = 2000 // rotation auto au-delà const IS_PROD = process.env.NODE_ENV === 'production' diff --git a/server/secret.ts b/server/secret.ts index 5c35059..2824bdb 100644 --- a/server/secret.ts +++ b/server/secret.ts @@ -11,7 +11,7 @@ import path from 'path' import crypto from 'crypto' import { DATA_DIR } from './config.js' -const SECRET_PATH = path.join(DATA_DIR, 'config', 'secret.key') +const SECRET_PATH = path.join(DATA_DIR, 'secret.key') function generateSecret(): string { return crypto.randomBytes(48).toString('hex') diff --git a/server/settings.ts b/server/settings.ts index a9cdd07..6789c59 100644 --- a/server/settings.ts +++ b/server/settings.ts @@ -2,7 +2,7 @@ import fs from 'fs' import path from 'path' import { DATA_DIR } from './config.js' -const DATA_PATH = path.join(DATA_DIR, 'config', 'settings.json') +const DATA_PATH = path.join(DATA_DIR, 'settings.json') export interface Settings { mediaPath : string diff --git a/server/torrent-clients/index.ts b/server/torrent-clients/index.ts index c29cac2..80dafe6 100644 --- a/server/torrent-clients/index.ts +++ b/server/torrent-clients/index.ts @@ -78,7 +78,7 @@ export function getAvailableClients(): TorrentClientDefinition[] { // ─── Persistence (clients enregistrés) ──────────────────────────────────────── -const CLIENTS_PATH = path.join(DATA_DIR, 'config', 'torrent_clients.json') +const CLIENTS_PATH = path.join(DATA_DIR, 'torrent_clients.json') function loadClients(): SavedClient[] { try {