Plans page created, listing the plans from the database, new plan page created and saving to database

This commit is contained in:
nicoagostini committed 2025-05-06 14:27:27 -07:00
1 parent 1d8ec431b2
commit b944c37c02
5 files changed
+134 -9

No files matched your search

+3 -2
View File
@@ -38,6 +38,7 @@ async function initDatabase() {
// For any collection, init here
users = await getCollection(db, "users");
plans = await getCollection(db, "plans");
}
/*** ROUTINGS ***/
@@ -76,8 +77,8 @@ initDatabase().then(() => {
app.use(require("./src/auth/authentication")(users));
// Import middleware & apply to user routes
const middleware = require("./src/auth/middleware")(users);
app.use(require('./src/router/user')(middleware, users));
const middleware = require("./src/auth/middleware")(users, plans);
app.use(require('./src/router/user')(middleware, users, plans));
// 404 handler
app.get('/*splat', (req, res) => {