Implemented the serverId into the speedtests.js controller

This commit is contained in:
Mathias Wagner
2024-05-19 15:32:42 +02:00
parent 4280e277a2
commit 87c8bb0aee

View File

@@ -2,8 +2,8 @@ const tests = require('../models/Speedtests');
const {Op, Sequelize} = require("sequelize");
const {mapFixed, mapRounded, calculateTestAverages} = require("../util/helpers");
module.exports.create = async (ping, download, upload, time, type = "auto", error = null) => {
return (await tests.create({ping, download, upload, error, type, time})).id;
module.exports.create = async (ping, download, upload, time, serverId, type = "auto", error = null) => {
return (await tests.create({ping, download, upload, error, serverId, type, time})).id;
}
module.exports.getOne = async (id) => {