fixed storing settings in a wrong format

This commit is contained in:
Mystikfluu
2022-07-26 01:28:56 +02:00
parent 7a1e659c42
commit c9a24b0d1a
2 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -42,7 +42,7 @@ module.exports = {
console.log(5,"changing settings", setting_to_change, setting_new_value, res.locals.settings)
let sql = "update ipost.users set User_Settings=? where User_Name=?"
let values = [res.locals.settings,res.locals.username]
let values = [JSON.stringify(res.locals.settings),res.locals.username]
con.query(sql, values, function (err, result) {
if(err) {
res.json({"status":"error","code":err})
@@ -52,4 +52,4 @@ module.exports = {
})
})
}
}
}