mirror of
https://github.com/gnmyt/myspeed.git
synced 2026-01-08 14:09:50 -06:00
Created the GET /speedtests/statistics route
This commit is contained in:
@@ -15,6 +15,10 @@ app.get("/averages", password(true), async (req, res) => {
|
||||
res.json(await tests.listAverage(req.query.days || 7));
|
||||
});
|
||||
|
||||
app.get("/statistics", password(true), async (req, res) => {
|
||||
res.json(await tests.listStatistics(req.query.days || 1));
|
||||
});
|
||||
|
||||
// Runs a speedtest
|
||||
app.post("/run", password(false), async (req, res) => {
|
||||
if (pauseController.currentState) return res.status(410).json({message: "The speedtests are currently paused"});
|
||||
|
||||
Reference in New Issue
Block a user