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,6 +1,6 @@
const mysql = require('mysql2/promise')
module.exports = async function (user_id, user_name) {
module.exports = rewardRedemption = (async (user_id, user_name) => {
// Create a connection to the MySQL database
const connection = await mysql.createConnection({
host: process.env.MYSQL_HOST,
@@ -27,4 +27,4 @@ module.exports = async function (user_id, user_name) {
// Terminate the connection to the database
await connection.end()
}
})