Modif utils pour "require-all" + Fix refresh error

This commit is contained in:
Zachary Guénot
2023-05-11 01:23:54 +02:00
parent 6bc5e67cbc
commit e5526cc908
16 changed files with 39 additions and 50 deletions

View File

@@ -1,7 +1,7 @@
const mysql = require('mysql2/promise')
require('dotenv').config()
module.exports = async function () {
module.exports = getRewardData = (async () => {
// Create a connection to the MySQL database
const connection = await mysql.createConnection({
host: process.env.MYSQL_HOST,
@@ -21,4 +21,4 @@ module.exports = async function () {
if (!results) return { error: 'No scoreboard data found' }
return results
}
})