Fixed database check.
This commit is contained in:
parent
a0a347e0c2
commit
5d2528da5f
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user