|
@@ -87,9 +87,9 @@ async function updateUserData2(host, database, cename, data, res) {
|
|
|
);
|
|
|
|
|
|
console.log('数据更新成功');
|
|
|
- //res.end(JSON.stringify({ status: "1" }))
|
|
|
+ res.end(JSON.stringify({ status: "1" }))
|
|
|
} catch (err) {
|
|
|
- //res.end(JSON.stringify({ status: "0", error: err.message })) // 返回错误信息
|
|
|
+ res.end(JSON.stringify({ status: "0", error: err.message })) // 返回错误信息
|
|
|
console.error('更新失败', err);
|
|
|
}
|
|
|
}
|
|
@@ -174,7 +174,7 @@ router.route('/updateUserData').all((req, res, next) => {
|
|
|
for (let key in data) {
|
|
|
decryptedData[key] = decodeURIComponent(data[key]);
|
|
|
}
|
|
|
- updateUserData("mongodb://root:usestudio-1@172.16.9.240:27017?authSource=admin", "cocolog", "applog", {
|
|
|
+ updateUserData("mongodb://root:usestudio-1@123.58.32.151:11641?authSource=admin", "cocolog", "applog", {
|
|
|
[date]: {
|
|
|
[decryptedData.username]: // 使用变量username作为键
|
|
|
{
|