First commit of the new Insider version on docker

This commit is contained in:
2024-03-27 18:20:08 +01:00
parent 7637b068f9
commit be57c29e6e
61 changed files with 13693 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
const mysql = require('mysql2/promise');
const pool = require('../config/database');
async function getParams() {
const connection = await pool.getConnection();
try {
const [rows] = await connection.execute('SELECT * FROM cdn');
return {
users: rows[0].users,
};
} finally {
connection.release();
}
}
async function updateParams(params) {
const connection = await pool.getConnection();
try {
await connection.execute('UPDATE cdn SET ?', [params]);
} finally {
connection.release();
}
}
module.exports = {
getParams,
updateParams
};