🏷️ use built-in types

This commit is contained in:
Axel Olausson Holtenäs 2022-04-14 20:09:10 +02:00
parent 1b2ee053f0
commit 8a1941d119
No known key found for this signature in database
GPG key ID: 9347A5E873995701

View file

@ -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);
});
};