User, match, sport schemas added.

This commit is contained in:
2022-04-01 05:29:20 -05:00
parent 30e921f0ea
commit 59cb5e27f8
6 changed files with 153 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
import { mongoose } from "../database/mongoose.js";
export function needDatabase(res, req, next) {
if (mongoose.connection.readyState != 1) {
res.status(500).send("Internal server error: Database connection faulty.");
} else {
next();
}
}