mirror of
https://github.com/gnmyt/myspeed.git
synced 2026-02-10 07:39:08 -06:00
Updated the recommendations.js route
This commit is contained in:
@@ -2,9 +2,8 @@ const app = require('express').Router();
|
||||
const recommendations = require('../controller/recommendations');
|
||||
const password = require('../middlewares/password');
|
||||
|
||||
// Gets all config entries
|
||||
app.get("/", password(false), async (req, res) => {
|
||||
let currentRecommendations = await recommendations.get();
|
||||
let currentRecommendations = await recommendations.getCurrent();
|
||||
if (currentRecommendations === null) return res.status(501).json({message: "There are no recommendations yet"});
|
||||
|
||||
return res.json(currentRecommendations);
|
||||
|
||||
Reference in New Issue
Block a user