mirror of
https://github.com/gnmyt/myspeed.git
synced 2026-02-09 23:18:37 -06:00
14 lines
491 B
JavaScript
14 lines
491 B
JavaScript
import express from 'express';
|
|
import * as recommendations from '../controller/recommendations.js';
|
|
import password from '../middlewares/password.js';
|
|
|
|
const app = express.Router();
|
|
|
|
app.get("/", password(false), async (req, res) => {
|
|
let currentRecommendations = await recommendations.getCurrent();
|
|
if (currentRecommendations === null) return res.status(501).json({message: "There are no recommendations yet"});
|
|
|
|
return res.json(currentRecommendations);
|
|
});
|
|
|
|
export default app; |