Fixed database check.

This commit is contained in:
Harrison Deng 2022-04-07 19:22:35 -05:00
parent a0a347e0c2
commit 5d2528da5f

View File

@ -1,7 +1,7 @@
import mongoose from "mongoose";
export function needDatabase(req, res, next) {
if (checkDatabaseConnection()) {
if (!checkDatabaseConnection()) {
res.status(500).send("Internal server error: Database connection faulty.");
} else {
next();