From cca7b6ac1e8d63ec8c5cc5bf1cdc78ffb7f016c4 Mon Sep 17 00:00:00 2001 From: Hans-0101 Date: Fri, 1 Dec 2023 22:21:17 +0900 Subject: [PATCH] fixed:inserting data to tb_cabon --- backend/src/routes/carbon/carbon.ctrl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/routes/carbon/carbon.ctrl.js b/backend/src/routes/carbon/carbon.ctrl.js index 996f03f..511a803 100644 --- a/backend/src/routes/carbon/carbon.ctrl.js +++ b/backend/src/routes/carbon/carbon.ctrl.js @@ -134,7 +134,7 @@ exports.get_carbon = async (req, res) => { ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ); `; - let sqlInsertVal = [userName, carbonEmission, userCode, nCPUcores, CPUpower, usageCPUUsed, memory, memoryPower, countryName, runTime, PUE, PSF, carbonIntensity, provider]; + let sqlInsertVal = [carbonEmission, userCode, nCPUcores, CPUpower, usageCPUUsed, memory, memoryPower, countryName, runTime, PUE, PSF, carbonIntensity, provider]; db.query(sqlInsert, sqlInsertVal, function (err, result) { if (err) { console.log("query is not executed: " + err);