Integrated the new "view access" system into the recommendations route

This commit is contained in:
Mathias Wagner
2022-11-20 18:17:25 +01:00
parent 792d44cdd3
commit 199042a2cf
+2 -1
View File
@@ -1,8 +1,9 @@
const app = require('express').Router();
const recommendations = require('../controller/recommendations');
const password = require('../middlewares/password');
// Gets all config entries
app.get("/", async (req, res) => {
app.get("/", password(false), async (req, res) => {
let currentRecommendations = await recommendations.get();
if (currentRecommendations === null) return res.status(501).json({message: "There are no recommendations yet"});