zonedata get api

This commit is contained in:
2025-03-26 18:05:13 +05:30
parent 679f16244f
commit b117c8705c
3 changed files with 16 additions and 1 deletions

View File

@@ -19,7 +19,7 @@ const MainModel = <T>(
authSource: process.env.MONGO_AUTH_DB || 'admin', // Default to 'admin' if not provided
maxPoolSize: 50,
};
console.log('authOptions: ', authOptions);
// Check if the connection already exists
if (connections[db]) {
return connections[db].model<T>(modelName, schema, collectionName);