Modif utils pour "require-all" + Fix refresh error
This commit is contained in:
@@ -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
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user