fix: config path /config/config to /config

This commit is contained in:
MasutaYunikon committed 2026-03-20 20:30:23 +01:00
1 parent 0d64a66977
commit 4d319f97bc
6 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -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 {}
+1 -1
View File
@@ -20,7 +20,7 @@ export interface LogEntry {
meta? : Record<string, any>
}
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'
+1 -1
View File
@@ -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')
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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 {