style: clean up code formatting and remove trailing whitespace
refactor: reorganize imports and fix type imports
This commit is contained in:
1 parent
d3704602fd
commit
47c04de6fe
232 files changed
+7140
-4798
No files matched your search
@@ -3,7 +3,7 @@
|
||||
* Singleton pattern para reutilizar conexão
|
||||
*/
|
||||
|
||||
import mongoose from "mongoose";
|
||||
import type mongoose from "mongoose";
|
||||
|
||||
function getMongoUrl(): string {
|
||||
const url = process.env.MONGO_URL;
|
||||
@@ -24,7 +24,7 @@ declare global {
|
||||
var mongoose: MongooseCache | undefined;
|
||||
}
|
||||
|
||||
let cached: MongooseCache = global.mongoose || { conn: null, promise: null };
|
||||
const cached: MongooseCache = global.mongoose || { conn: null, promise: null };
|
||||
|
||||
if (!global.mongoose) {
|
||||
global.mongoose = cached;
|
||||
@@ -79,4 +79,3 @@ export async function disconnectMongoDB(): Promise<void> {
|
||||
cached.promise = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user