fix: 移除生产环境的数据库路径日志输出 (P1安全修复)

This commit is contained in:
ddshi 2026-01-29 16:43:55 +08:00
parent fbff8cc230
commit 747060af25

View File

@ -9,7 +9,10 @@ dotenv.config();
const __dirname = path.dirname(fileURLToPath(import.meta.url)); const __dirname = path.dirname(fileURLToPath(import.meta.url));
const dbPath = path.resolve(__dirname, '../../prisma/dev.db'); const dbPath = path.resolve(__dirname, '../../prisma/dev.db');
// Only log database path in development environment
if (process.env.NODE_ENV !== 'production') {
console.log('Database path:', dbPath); console.log('Database path:', dbPath);
}
// Create LibSQL client // Create LibSQL client
const db = createClient({ const db = createClient({