feat:添加登录功能

This commit is contained in:
2025-11-10 13:58:06 +08:00
parent 49f9b28091
commit 2e2caeaab5
36 changed files with 1076 additions and 458 deletions

View File

@@ -4,8 +4,8 @@ import { logger } from './logger.js';
export async function connectToDatabase(): Promise<void> {
if (!env.MONGODB_URI) {
logger.warn('Skipping MongoDB connection: MONGODB_URI is not set.');
return;
logger.error('Database connection failed: MONGODB_URI is not set.');
throw new Error('MONGODB_URI must be provided to connect to MongoDB.');
}
try {