feat:添加登录功能
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user