🏷️ use built-in types
This commit is contained in:
parent
1b2ee053f0
commit
8a1941d119
1 changed files with 3 additions and 3 deletions
|
@ -8,13 +8,13 @@ import logger from "@logger";
|
|||
import { url } from "@config/database";
|
||||
|
||||
export default async () => {
|
||||
mongoose.connect(url).then(async (connection: any) => {
|
||||
mongoose.connect(url).then(async (connection) => {
|
||||
logger?.info(`Connected to database: ${connection.connection.name}`);
|
||||
});
|
||||
mongoose.connection.on("error", (error: any) => {
|
||||
mongoose.connection.on("error", (error) => {
|
||||
logger?.error(error);
|
||||
});
|
||||
mongoose.connection.on("warn", (warning: any) => {
|
||||
mongoose.connection.on("warn", (warning) => {
|
||||
logger?.warn(warning);
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue